Re: Custom Authentication
- From: "Tarun Mistry" <nospam@xxxxxxxxxx>
- Date: Wed, 20 Sep 2006 20:32:12 +0100
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
.
- Follow-Ups:
- Re: Custom Authentication
- From: Edwin Knoppert
- Re: Custom Authentication
- References:
- Custom Authentication
- From: Tarun Mistry
- Custom Authentication
- Prev by Date: Dynamic control creation in datagrid based on data in that column
- Next by Date: Re: how'd they do that
- Previous by thread: Custom Authentication
- Next by thread: Re: Custom Authentication
- Index(es):
Relevant Pages
|