Nov 25 2006

HttpSessionState and ASP.NET Exception

Category: ASP.NET 1.x | ASP.NET 2.0 - GeneralBil@l @ 14:32

A nice trick I read in the ASP.NET 2.0 Core Reference is that, when an exception occurs at the end of the request, that is the GetLastError of the Server object returns an exception, the Session data is lost, however, in your handler of the Exception, if you call Server.ClearError, the Session is restored!

That is a great tip Dino, Thanks!


Tags: ,

Comments are closed