malikirfan28
asked on
Session Timeout in ASP.Net 4.0
Hello Everyone!
I have configured SessionTimeout in my ASP.Net application to 60 minutes in Web.Config file using following configuration.
I have also set SessionTimeout in IIS to 60 minutes as expained here.
But I am observing very unstable session timeout behaviour, sometimes it occur after 20 minutes and sometimes after 20+ minutes.
Kindly suggest what I am doing wrong?
I have configured SessionTimeout in my ASP.Net application to 60 minutes in Web.Config file using following configuration.
<sessionState mode="InProc" stateConnectionString="tcpip=localhost:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="60"/>
I have also set SessionTimeout in IIS to 60 minutes as expained here.
But I am observing very unstable session timeout behaviour, sometimes it occur after 20 minutes and sometimes after 20+ minutes.
Kindly suggest what I am doing wrong?
This might be memory issues. Is your web site being accessed heavily? If it does, you might want to try shifting mode from Inproc to State Server or SQL Server.
http://msdn.microsoft.com/en-us/library/ms178586.aspx
http://msdn.microsoft.com/en-us/library/ms178586.aspx
ASKER
Pratima: The solution you provided is for IIS6/IIS5 but as I mentioned I am using IIS7.
Alfred: No it is not havily accessed. Right now only two user are accessing the site and facing this session timeout issue.
Alfred: No it is not havily accessed. Right now only two user are accessing the site and facing this session timeout issue.
Have you checked the application event log to determine why your session is dropping? You might have some unhandled exception that is causing your web site session to crash.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Yes I have verified there is no detail in Event Log.
http://forums.asp.net/t/1283350.aspx