T
tshad
I have an exception page I am trying to display with my exception
information and was trying various ways of passing the data and found that a
couple of ways gave me a blank page:
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html;
charset=windows-1252"></HEAD>
<BODY></BODY></HTML>
The code in my Global.asax is:
**************************************************
Sub Application_Error(Sender As Object, E as EventArgs)
Dim LastException as String = Context.Error.ToString()
Context.ClearError()
response.Redirect("/PageError.aspx")
response.Redirect("/PageError.aspx?Err=" &
Server.GetLastError().ToString())
response.Redirect("/PageError.aspx?Err=" &
Server.UrlEncode(LastException))
response.Redirect("/PageError.aspx?Err=" & LastException)
End Sub
**************************************************
The 1st and 3rd Redirects work fine. but the 2nd and 4th where I am passing
Server.GetLastError().ToString() and LastException don't seem to get
handled. I get the above blank page returned for both of these.
Why can't it handle these?
Thanks,
Tom
information and was trying various ways of passing the data and found that a
couple of ways gave me a blank page:
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html;
charset=windows-1252"></HEAD>
<BODY></BODY></HTML>
The code in my Global.asax is:
**************************************************
Sub Application_Error(Sender As Object, E as EventArgs)
Dim LastException as String = Context.Error.ToString()
Context.ClearError()
response.Redirect("/PageError.aspx")
response.Redirect("/PageError.aspx?Err=" &
Server.GetLastError().ToString())
response.Redirect("/PageError.aspx?Err=" &
Server.UrlEncode(LastException))
response.Redirect("/PageError.aspx?Err=" & LastException)
End Sub
**************************************************
The 1st and 3rd Redirects work fine. but the 2nd and 4th where I am passing
Server.GetLastError().ToString() and LastException don't seem to get
handled. I get the above blank page returned for both of these.
Why can't it handle these?
Thanks,
Tom