Form Authorization Ticket Not Expiring

  • Thread starter Thread starter chongo
  • Start date Start date
C

chongo

Hi,

I created a login Form that logs into my application.

In the Web.config file I have

<authentication mode="Forms" >
<forms name="loginForm" loginUrl="login.aspx"
protection="All" timeout="5" > ...

The problem I'm having is my application won't timeout after 5
minutes. The only time the ticket expires is when I Sign out of the
application.

Does any one have any suggestion,or know why this is happening?

Any help would be greatly appreciated.
 
When you called:

FormsAuthentication.RedirectFromLoginPage("name", bool persist);

Did you happen to pass the 'bool persist' argument as true? If so you just
created a cookie independent from your session that's now stored on your
machine. Every time you login the application will find this cookie and use
it. But don't worry the lifetime of it is only 50 years or so.

If this sound's like the problem try changing the second argument to false
and then the cookie starts using that timeout property in web.config.

good luck
Trent
 
Back
Top