Session Timeout in IIS 7

I like to host the asp.net web application in IIS 7.0 (Windows Server 2008).

I configured the session state as sessionstate mode = "inproc" timeout = 120. Even the session expires after 15 seconds. What could be the problem?.

thanks

+4
iis-7 session-timeout
source share
6 answers

Check the Windows event log to ensure that the workflow will not be re-created.

There might be something in your code that forces Worker Process to force recyle, in which case when the session is stored inProc, it will lose all the session values ​​that it holds.

+7
source share

You can check connection timeouts in these two areas. enter image description here

enter image description here

OR

Advanced settings

+10
source share

it sounds like the session timeout is set incorrectly in the web.config file, you can try something like:

<system.web> <sessionState timeout="2" /> 

to set a timeout of 2 minutes

http://msdn.microsoft.com/en-us/library/h6bb9cz9(vs.71).aspx

+6
source share

Mmerrell wrote this and is the key to finding the origin of the problem:

Check the Windows event log to make sure that the workflow is not being forced to redo.

There might be something in your code that forces the Worker Process to force itself to process, and in this case, when the session is stored inProc, it will lose all the session values ​​that it holds.

Look at the event viewer in the "Windows Logs / System", you are looking for the source event "WAS", which contains a description of the type: "Workflow with process identifier" 2980 "serving the application pool" SIAC "was disabled due to inactivity. The application pool timeout configuration was set to 20 minutes. A new workflow will be launched if necessary. " this is the symptom you are looking for.

View events with a WAS event

Hope this helps.

+4
source share

Had pretty much the same problem with an HTTP handler written in C # using SessionState. It seems the IsReusable property should be false, otherwise I worked in a session problem.

Thanks to Mmerrell for his answer that led me on the right track.

+1
source share

There is one more thing that needs to be checked - additional settings for the Pool Pool application - virtual memory limitation. See if it is explicitly set - since it can be automatically recycled, it once exceeds the set limit. Especially if you see an error in the event log, for example:

A workflow with process identifier "****" serving the application pool "your-app-pool-name" requested processing because it reached the limit of its virtual memory.

0
source share

All Articles