customErrors

G

Guest

I have the following in my web config file:

<customErrors mode="RemoteOnly" defaultRedirect="Error.aspx" />

Here is the code in the Error.aspx:

protected void Page_Load(object sender, EventArgs e)
{
Exception err = Server.GetLastError().GetBaseException();

this.lblMessage.Text = err.ToString();
}

If mode is set to RemoteOnly I still get the yellow screen of death.
If mode is set to Off I still get the yellow screen of death.
If mode is set to On I get the yellow screen of death that tells me to set
the mode to RemoteOnly or Off to see the actual error message.

Why the heck doesn't it direct to my Error.aspx page and show the error that
way?
 

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

Similar Threads

Custom Errors Not Working 4
customErrors 1
HTTP Error 404 1
<customErrors 3
customErrors 1
Read <customErrors> element via VB.NET Code? 9
Frustrations with Error Logging 1
CustomError not working properly 0

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top