In ASP.NET should we call Session.Abandon() when an unhandled exception occurs ?
There are many end users that hit “refresh” or “back” in the web browser in order to resubmit the request. I would like to prevent this behavior by resetting the context.
TIA.
In ASP.NET should we call Session.Abandon() when an unhandled exception occurs ? There are
Share
That depends on what you keep in the session.
In most cases it won’t be good to log user out just because there’s an error in your code. Make a custom error page, and redirect there, so user can spam refresh on the error page as long as he wants.