How can I track the cause of an ASP.NET session failure?

I am trying to track down a problem in an ASP.NET v3.5 application where it HttpSessionexpires before it (by default) 20 minutes. We observe behavior when a session is lost for only a few minutes in a session, at random and for no apparent reason, such as unhandled exceptions. As far as I can tell, the ASP.NET workflow does not die, otherwise this would explain the dropped session.

What approach should be used for monitoring when a session is canceled? Is there any event that I can listen to, or some other hook in the namespace System.Web?

Also, can anyone confirm that the countdown to the expiration date is reset via web activity? That is, the session lifetime gets reset (default) 20 minutes each time the web client does an HTTP GET or POST?

+3
source share
2 answers

There is a Session_OnEnd that you can use.

+2
source

You have checked the limits configured for IIS. Some of them restrict the use of CPU, network, etc. If this happens, it will write all entries to the event log if it closes the session.

And for your second question, the IIS session countdown timer rests with every request.

: . http://bluedragon.blog-city.com/lost_sessions_webgardens_sessionstate.htm

1.

Cheers,

+1

Source: https://habr.com/ru/post/1780386/


All Articles