Skip Navigation Links
MAIN
RESUME
IMAGE GALLERIES
ABOUT ME
OTHER STUFF
  Thursday, August 28, 2008  
Skip Navigation Links

IIS 6 on a Development box and Premature Session End

clock January 13, 2008 17:32 by author Troy

I started working on a legacy web application that was comprised of both classic ASP and ASP.NET.  The development box was running win 2003 server x64 with IIS 6. 

The application typically uses the standard 20 minute session timeout period, however, for my dev box, I wanted to lengthen that time to avoid having to log in more times than necessary.  I set the classic ASP session to 240 minutes, and the ASP.NET session to 240 minutes in the web.config file.

I then proceeded to go to work.  A short time later, I was redirected to the login page.  Hmm, wierd I thought.  Ah, let it go this time.  Log in and keep working.

The next day, after my initial log in, once again my session timed out after about 40 minutes and I was redirected to the login page.  I double checked my session times, both were still set to 240 minutes.

After a little bit of head scratching, I found my way into the properties of the Application Pool for my web app in IIS.  My attention was drawn to the Recycling tab where I noted that my application pool would be recycled every 1740 minutes.  Since my sessions were stored "In Process", this recycling would kill my session, however, the timing didn't seem too likely.  Nonetheless, I changed the property to configure the worker process to recycle at a specifiec time instead:  3am.

On the Performance tab, I found something even more interesting.  An "Idle Timeout" setting that was set to shutdown the worker process after being idle for 20 minutes.  Bingo!

So even though my session timeouts were set correctly at 240 minutes, I could still lose my session after 20 minutes because the worker process would be shut down after 20 minutes of inactivity... which might be common on a development machine where you are the only web site visitor and you are distracted by other work or working in other applications for a period of time.

Once I turned off the "Idle Timeout" feature for my Application Pool, my premature session death is a thing of the past.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


This is my first blog post.

clock January 12, 2008 12:41 by author Troy

I'm not sure that I have that much to say yet.

I am still getting my feet wet when it comes to the whole blogging thing.  For instance, WTF is a slug?  I see that it is optional, so that is good.  I also see that I can extract a slug from a file.  Hmm, can't wait to google that in the context of blogging and find out what it is.

Well, that is probably enough for my first post.  I don't want to burn myself out too quickly.

Currently rated 3.0 by 1 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


blog.TroyFarrell

About the author

Troy Farrell

E-mail me Send mail
Troy Farrell
I am a software architect and computer programmer living in Peterborough, Ontario, Canada.

Search

Calendar

<<  August 2008  >>
SuMoTuWeThFrSa
272829303112
3456789
10111213141516
17181920212223
24252627282930
31123456

Archive

Tags

Categories


Blogroll

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway. In fact, if I was agitated at the time, they may not reflect my own personal opinions.

© Copyright 2008

Sign in

© Copyright Troy Farrell 2008