Vivek Thakur

Chaotically Complex

  Home  |   Contact  |   Syndication    |   Login
  105 Posts | 1 Stories | 491 Comments | 65 Trackbacks

News



Archives

ASP.NET Ventures

Saturday, April 26, 2008 #

*******************
Note: view the updated entry below:

http://www.codeasp.net/blogs/vivek_iit/microsoft.net/5/session-expired-issue


*******************

Since last week we were getting this weird error when someone tried to post in our client applications forums:

The session identity provided has expired or could not be found.

This was a custom error which clearly meant that session has expired, but the strange thing was that every one was still logged on and after moving back and doing a refresh lets the post get through, without any error.

There was also another related error which was also due to sessions not getting expired after clicking LogOut button, in the event handler of which we had clearly expired session using Session.Abandon(). Session.RemoveALL() and god knows what all!

This problem took 2-3 days as we were trying to find out the reason in the code, but looked as if everything was perfect.

Then accidentally we noticed that Web garden had been enabled on the application in IIS!

We used this tool:

IISAPP:  to find what PID to trace, and we noticed this:

W3WP.exe PID: 12408 AppPoolId: app.com(domain)(pool)
W3WP.exe PID: 4348 AppPoolId: app.com(domain)(pool)
W3WP.exe PID: 4736 AppPoolId: DefaultAppPool


We have two PID's for one pool! That clearly indicated that something is wrong with the way app had been set up, and we opened IIS MMC and noticed that web garden was indeed enabled, causing session to mix up!

We disabled it and the app was fine! Now all that needs to be done is to find the culprit who switched it on!

In the process I also learnt about iisstate tool:

iistate -p PID -d -sc -hc > iisoutput.txt

This would then give me every .net temp file accessed every symbol loaded!