Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Form Authentication

Reply
Thread Tools

Form Authentication

 
 
Frank
Guest
Posts: n/a
 
      01-31-2006
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.
Francisco

 
Reply With Quote
 
 
 
 
Dominick Baier [DevelopMentor]
Guest
Posts: n/a
 
      01-31-2006
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. Francisco
>



 
Reply With Quote
 
 
 
 
Frank
Guest
Posts: n/a
 
      01-31-2006
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. Francisco
> >

>
>
>

 
Reply With Quote
 
Dominick Baier [DevelopMentor]
Guest
Posts: n/a
 
      01-31-2006
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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to retrieve form field value if form is EncType=multipart/form-dataForm? Li Zhang ASP .Net 4 02-27-2009 01:23 AM
HTTP basic authentication with form-based authentication Max Python 2 08-08-2008 06:16 PM
Changing Basic Authentication to Form-Based Authentication Dom Java 0 10-18-2004 03:30 PM
From Basic Authentication to Form-Based Authentication Dom Java 0 10-15-2004 09:50 PM
authenticate win32 form client with form based authentication web services kitchai yong via .NET 247 ASP .Net Web Services 1 05-13-2004 05:01 AM



Advertisments