Re: Custom Authentication

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Any help appreciated!

Many thanks.
Taz

FYI, for anyone who was also stuck like i was.

The FormAuthentication class is the one that creates the encrypted ticket in
the cookie. Thus the following checks to see if a user is valid, if so it
"logs" them in by providing the secure cookie

if(Membership.ValidateUser("test", "test123"))
{ Forms.SetAuthCookie("test"); }

Finally, a user can be checked to be logged in on any page by
"User.Identity.IsAuthentication".

The following classes will be of use to anyone making there own
authentication systems on the back of the security model provided by ASP.NET
2.0

Membership
FormsAuthentication
FormsAuthenticationTicket

Cheers
Taz


.



Relevant Pages

  • Re: Autologin wenn meine Seite besucht wird.
    ... Du kannst die FormsAuthentication verwenden, um das Cookie zu setzen und auszulesen. ... ließt du es aus und ermittelst anhand der gespeicherten Benutzerkennung den Benutzer. ... Ich finde immer nur Sachen mit dem ASP.Net Login Control. ...
    (microsoft.public.de.german.entwickler.dotnet.asp)
  • strange Formsauthentication behavior
    ... odd behabivor when using formsauthentication in 2.0. ... string encryptedTicket = FormsAuthentication.Encrypt; ... // cookie as data. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • HELP: FormsAuthentication Cookie with multiple domains
    ... I'm having this really crazy problem. ... persistant) cookie. ... that by setting the domain of the formsauthentication cookie to ... that, i can't logout. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Persist login does not work
    ... // Create a cookie and add the encrypted ticket to the cookie as data. ... HttpCookie authCookie = new HttpCookie(FormsAuthentication.FormsCookieName, ... the bang project <shameless self promotion> ...
    (microsoft.public.dotnet.security)
  • Re: Forms Authentication and recycling web.config
    ... formsauthentication 's token is stored in cookie. ... stored in the client user's machine that's why it can remain even afte the ... And the session state are server side resources and by default it stored ...
    (microsoft.public.dotnet.framework.aspnet)