Avatar of malikirfan28
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.
<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?
ASP.NETASPMicrosoft IIS Web Server

Avatar of undefined
Last Comment
malikirfan28
Avatar of Pratima
Pratima
Flag of India image

Avatar of Alfred A.
Alfred A.
Flag of Australia image

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
Avatar of malikirfan28
malikirfan28

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.
Avatar of Alfred A.
Alfred A.
Flag of Australia image

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
Avatar of Pratima
Pratima
Flag of India image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of malikirfan28
malikirfan28

ASKER

Yes I have verified there is no detail in Event Log.
ASP.NET
ASP.NET

The successor to Active Server Pages, ASP.NET websites utilize the .NET framework to produce dynamic, data and content-driven web applications and services. ASP.NET code can be written using any .NET supported language. As of 2009, ASP.NET can also apply the Model-View-Controller (MVC) pattern to web applications

128K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo