On the site we are building. We need to be able to redirect the user to a default page when his session has ended.
At first sight we used the Session_End with a Response.Redirect to do this job.
Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
Response.Redirect("~/global/exit.aspx")
End Sub
But it generates a crapload of Response is not available in this context errors. Naturally we don't want to spam our servers error logs.
What is the most efficient way to handle session ending with ASP.NET 2.0?