adding username/password to website

G

Guest

How can I add username/password authentication on my site? I have asp.net
2.0. If the user's not logged in, that page should be displayed when I try
to go to any of the pages.
Also, how can I add a "login" timer so that the user is automatically logged
out after X minutes of inactivity?

Thanks.
 
W

Willy Denoyette [MVP]

| How can I add username/password authentication on my site? I have asp.net
| 2.0. If the user's not logged in, that page should be displayed when I
try
| to go to any of the pages.
| Also, how can I add a "login" timer so that the user is automatically
logged
| out after X minutes of inactivity?
|
| Thanks.

Please asp related questions are better answered in the aspnet NG's like
microsoft.public.dotnet.framework.aspnet.security or
microsoft.public.dotnet.framework.aspnet, your question does not relate to
CSHARP language at all.

Willy.
 
A

Alan Pretre

VMI said:
How can I add username/password authentication on my site? I have asp.net
2.0. If the user's not logged in, that page should be displayed when I
try
to go to any of the pages.

Store your authentication state in session variables. Each page can check
for proper authentication and redirect if unhappy. This also catches
session timeouts.
Also, how can I add a "login" timer so that the user is automatically
logged
out after X minutes of inactivity?

Set your session timeout appropriately in web.config.



As mentioned, better to ask these questions in the m.p.d.framework.aspnet
NG.

-- Alan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top