I'm running a ASP.NET website on my development box (.NET 2.0 on Vista/IIS7). The Session_Start method in global.asax.cs logs every call to a file (log4net). The Session_End method also logs every call.
I'm using InProc session state, and set the session timeout to 5 mins (to avoid waiting for 20 mins).
I hit the website, wait for 5 minutes unit I see the Session_End logging. Then I F5 the website. The browsers still has the session cookie and sends it to the server. Session_Start is called and a new session is created using the same session id (btw: I need this to be the same session id, because it is used to store data in database).
Result: Every time I hit F5 on a previously ended session, the Session_Start method is called, the request is executed and the Session_End method is called immediately.
When I open a different browser, the Session_Start method is called just once. Then after 5 minutes the Session_End each F5 causes the Session_Start/request/Session_End sequence to execute.
web.config relevant section:
<system.web>
<compilation debug="true" />
<sessionState timeout="2" regenerateExpiredSessionId="false" />
</system.web>