M
Mike Malter
I have a general error page that I configured in web.config as
<customErrors mode="On" defaultRedirect="CRDefaultError.aspx" />
This error page comes up whenever an error occurs outside of any try/catch blocks.
This page has a text box in it that I would like to fill with relevant information about the error. I am trying to put the
Server.GetLastError().ToString() in there. It did not work on the page, and I read somewhere that I should create a session
variable in the Application_Error event in Global.aspx. My problem is that if I try to create a session variable in
Application_Error, it throws another error!
So, is there anyway that I can simply grab the Server.GetLastError().ToString() and get to it in my custom error page?
Thanks.
Mike
<customErrors mode="On" defaultRedirect="CRDefaultError.aspx" />
This error page comes up whenever an error occurs outside of any try/catch blocks.
This page has a text box in it that I would like to fill with relevant information about the error. I am trying to put the
Server.GetLastError().ToString() in there. It did not work on the page, and I read somewhere that I should create a session
variable in the Application_Error event in Global.aspx. My problem is that if I try to create a session variable in
Application_Error, it throws another error!
So, is there anyway that I can simply grab the Server.GetLastError().ToString() and get to it in my custom error page?
Thanks.
Mike