Short ASP.NET 2 session lifetime

I spent quite some time figuring this one out. I have a ASP.NET 2.0 application and I needed to store something in the session. That worked fine, but the session was destroyed after a minute or so. Even dough I have set the timeout property of the sessionState tag in web.config to 20 minutes.
Well after some time I realized that if you view the page trough the built in ASP.NET server that comes with Visual Studio 2005 your sessions are destroyed in a couple of minutes. But if you set up your page in IIS and view it trough the assigned address everything works as it should.
Avtor: Anonymous, objavljeno na portalu SloDug.si (Arhiv)

Leave a comment

Please note that we won't show your email to others, or use it for sending unwanted emails. We will only use it to render your Gravatar image and to validate you as a real person.