Session Timeout in ASP.Net 4.0

malikirfan28
malikirfan28 used Ask the Experts™
on
Hello Everyone!
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"/>

Open in new window


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?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
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

Author

Commented:
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.
11/26 Forrester Webinar: Savings for Enterprise

How can your organization benefit from savings just by replacing your legacy backup solutions with Acronis' #CyberProtection? Join Forrester's Joe Branca and Ryan Davis from Acronis live as they explain how you can too.

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.

Author

Commented:
Yes I have verified there is no detail in Event Log.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial