I am trying to passing Exception info tpa custom error page that I have created, and I'm looking for the best way to do so.
I ended up creating a session object on my Global.asax page, and I pass the error data to the session object during the Application_Error event, but it throws it's own exception prior to working.
My Global.asax code:
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
Dim ex As Exception = Server.GetLastError()
Session("error") = ex.InnerException.Message.ToString()
End Sub
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
Session("error") = ""
End Sub
I have also updated my web.config with my error page that I would like to pass session object data to:
<customErrors mode="On&qu ...
Go to the complete details ...