Exception page not displaying

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top