Thursday, November 15, 2007

sessions are expiring very quickly in under 2 minutes. What can we do to prevent this?


Solution This is a specific issue on Windows 2003/IIS6 servers. What happens is that any shared host creates application pools within IIS6 to host certain x number of websites. Each server may have several application pools and all websites on the server are divided among these pools. When a customer's website calls session.terminate within any application pool, all session variables are lost within that pool.

The only real solution to this issue (which is highly recommended by many developers and Microsoft themselves) is to use database session management. Here you can store all session related data in a local database.

No comments: