views:

27

answers:

1

Hi,

our web application frequently losses it's session state (user is being logged out very often). I predict that the reason of such behavior are some exceptions thrown and unhandled in side threads of application or whole application restart.

I'm pretty sure that it's not caused by recycle worker, because it happens in irregular periods of time and many times just after logging into application (after browsking two or three pages).

Are there any good ways to diagnose the reasons of session loss? Are there any tools, or should I use Global.asax in some nice way?

Thanks for any of your comments and answers. Regards

+2  A: 

First thing is to check the event viewer on the web server, major issues would get logged there by IIS and/or the ASP.Net worker process.

Steve Haigh
Okay, but can I somehow recognize this situation in my code and make an log with crash information?
ŁukaszW.pl
I suspect some issues will be logged by IIS or ASP.Net without you needing to log yourself, but you could add logging to relevant methods in Global.asax, e.g. Application_Error.
Steve Haigh