how to persist login

R

Rotsey

Hi,

I have a web site dev with VS2003, .NET 1.1.

I am persisting the login with the statement below
When I login and then close the browser repoen it
works fine. But when I leave the session to timeout
it wants me to login again.

Anyone no why????

rotsey


FormsAuthentication.SetAuthCookie(usr, True)
 
P

Peter Bradley

Because the session has timed out.

Secure programs don't leave people logged in indefinitely - otherwise anyone
could hijack the session. The default timeout is 20 minutes and it's set in
Web.config. We reduce this to 10 minutes for security reasons on our
applicaitons.

The default timeout for the cookie is one hour. It seems nonsense to have
these at different values, so we set them both to 10 minutes.

YMMV.


Peter
 

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

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,140
Latest member
SweetcalmCBDreview
Top