Hari Gillala
Hari Gillala

Reputation: 11916

Custom Error Display

I am using this code to display the custom errors in my site. I can see the errors being displayed in my local machine.

But when I deploy the Same code, The errors are not being displayed.

It comes up with the following message:

The page cannot be displayed There is a problem with the page you are trying to reach and it cannot be displayed.


Please try the following:

Open the sitename:2004 home page, and then look for links to the information you want. Click the Refresh button, or try again later.

Click Search to look for information on the Internet. You can also see a list of related sites.

HTTP 500 - Internal server error

Internet Explorer

The Web Config code is:

<customErrors mode="Off" defaultRedirect="GenericErrorPage.htm">
        <error statusCode="403" redirect="NoAccess.htm" />
        <error statusCode="404" redirect="FileNotFound.htm" />
    </customErrors>

Could any body let me know what other setting needs to be changed to see the error message so that I can fix the problems in my code.

Thank you

Hari Gillala

Upvotes: 0

Views: 144

Answers (1)

Madhur Ahuja
Madhur Ahuja

Reputation: 22661

CustomErrors should be On for it to work .. Isn't it ?

<customErrors mode="On" defaultRedirect="GenericErrorPage.htm">
        <error statusCode="403" redirect="NoAccess.htm" />
        <error statusCode="404" redirect="FileNotFound.htm" />
    </customErrors>

Upvotes: 2

Related Questions