views:

102

answers:

4

Hi,

We are having an intermittent problem with some users losing session. Our session settings in the web.config are as follows:

<sessionState mode="InProc" timeout="1440"/>

...which should be 24 hours (a value deliberately set over the top during testing).

Are there any other settings (maybe in IIS7) that I need to be aware of? Or are there any resources that will list the things that could kill a user's session?

Let me know if you need more information.

Thanks!

Dave

+4  A: 

Changing the web.config file, or any of the dlls will cause the session to be destroyed, as will the recycling of app pools (this is usually set to a timeout of 20 mins of inactivity, but will also occur under certain exception conditions and possibly memory conditions)

Matthew Steeples
+1  A: 

Anything that recycles the application pool will kill InProc session state.

Check the properties on the application pool by default there are several settings which may cause the pool to recycle in less then 24 hours.

Typically when testing there is little activity on the site and you fall foul of the pool idle timeout.

AnthonyWJones
+2  A: 

Check Application Pool settings. There are several things there that can interfere with this:

  • Process recycling settings;
  • Several processes (then each would be keeping its own session stash);
  • Changing web.config or other web related files recycles the process immediately.
Vilx-
A: 

Thanks for all the replies, it seems it was because the App Pool was set to recycle at 3am and some of the users were just leaving themselves logged in over night and then just carrying on in the morning! We've added better session timeout handling now.

Thanks again!

DavidGouge