Hi,
you usually use RedirectFromLoginPage or SetAuthCookie to set the cookie.
The FormsAuth infrastructure will transparently decrypt the cookie and populate
Context.User on subsequent requests for you. No SessionState needed at all.
look at
Context.User.Identity.Name and .IsAuthenticated
after authentication
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
> Do I need a session variable to say the user is log on or
> SetAuthCookie and GetAuthCookie is enough to do so. Thanks
>
> "Dominick Baier [DevelopMentor]" wrote:
>
>> Hi,
>>
>> start here:
>> http://samples.gotdotnet.com/quickst...formsauth.aspx
>> ---------------------------------------
>> Dominick Baier - DevelopMentor
>> http://www.leastprivilege.com
>>> Hi,
>>> I'm creating a class, that will go to a database and authenticate
>>> if the
>>> user
>>> exist and the password is correct. What I don't understand, is how I
>>> tell my application that the user is authenticated (during a time
>>> period), so It doesn't keep asking for the login. Francisc