code_junkie

Forms Authentication across Applications

Nov 10th, 2011
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. <location path="ccnet">
  2. <system.web>
  3. <authentication mode="Forms">
  4. <forms loginUrl="/default.aspx" timeout="5000"/>
  5. </authentication>
  6. <authorization>
  7. <allow users="?"/>
  8. <deny users="?"/>
  9. </authorization>
  10. </system.web>
  11. </location>
  12.  
  13. <machineKey validationKey="AutoGenerate" decryptionKey="AutoGenerate" validation="SHA1" />
  14.  
  15. <authentication mode="Forms">
  16. <forms name="ccAuth" loginUrl="/default.aspx" path="/" timeout="5000"/>
  17. </authentication>
  18. <authorization>
  19. <deny users="?"/>
  20. </authorization>
  21.  
  22. <location path="ccnet">
  23. <system.web>
  24. <authentication mode="Forms">
  25. <forms name="ccAuth" loginUrl="/default.aspx" path="/" timeout="5000"/>
  26. </authentication>
  27. <authorization>
  28. <deny users="?"/>
  29. </authorization>
  30. </system.web>
  31. </location>
  32.  
  33. <authentication mode="Forms">
  34. <forms name="{name}" path="/" ...>
  35. </authentication>
  36.  
  37. <machineKey validationKey="AutoGenerate" decryptionKey="AutoGenerate" validation="SHA1" />
  38.  
  39. <deny users="?"/>
  40.  
  41. If CustomAuthenticate(Login1.UserName, Login1.Password) Then
  42. FormsAuthentication.RedirectFromLoginPage(Login1.UserName, False)
  43. Else
  44. e.Authenticated = False
  45. End If
  46.  
  47. <deny users="?"/>
Add Comment
Please, Sign In to add comment