Forms Authentication Expiration Problem

P

Prasad Dannani

Hi Techies,
I am using Forms authentication for my asp.net i had given session time out
as 500
and also Forms time out also 500 even though its getting expired soon may be
4 minutes of Idleness its getting expired
see the forms auth configuration below

<authentication mode= "Forms" >
<forms name="adAuthCookie" loginUrl="LoginPage.aspx" protection="All"
timeout="500" path="/"/>
</authentication>
Had any body faced this problem earlier??

Thanks & Regards
R. Senthli Kumaran
 
J

jwalkerjr

Yes, many times. The Forms authentication timeout and Session timeout
work differently. Session timeout works by counting down from the last
time the use posted back (connected to) the server. Forms
authentication works on a half time scale. Basically, if the timeout
for Forms Authentication is set for 40 minutes, it waits until 20
minutes are done and then checks to see if the user has hit back to the
server.

So what I do is this. I check in the Global.asax.vb file in the
following event which basically say, if the session times out, then
expire the forms authentication ticket, which will bring them back to
the login page:

Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the session is started
System.Web.Security.FormsAuthentication.SignOut()
End Sub
 

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,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top