ZhiYi
June 3rd, 2007, 11:03 PM
I have created a custom error web page which is supposed to be displayed when the user tries to access an invalid page but instead of the custom error page appearing, the standard "Server Error in 'Error handling' application. The resource cannot be found" asp.net error page appeared instead.
I edited the web.config file like this:
<customErrors mode="Off" defaultRedirect="PageNotFound.aspx">
<error statusCode="403" redirect="PageNotFound.aspx"/>
<error statusCode="404" redirect="PageNotFound.aspx"/>
The custom page's name is PageNotFound.aspx.
The default address of the website is: http://localhost:1351/Error%20handling
When I tried to access a non existant web page like:
http://localhost:1351/Error%20handling/lucky.aspx , only the standard error page appeared instead of the custom error page.
How do I make the custom error page appear?
I edited the web.config file like this:
<customErrors mode="Off" defaultRedirect="PageNotFound.aspx">
<error statusCode="403" redirect="PageNotFound.aspx"/>
<error statusCode="404" redirect="PageNotFound.aspx"/>
The custom page's name is PageNotFound.aspx.
The default address of the website is: http://localhost:1351/Error%20handling
When I tried to access a non existant web page like:
http://localhost:1351/Error%20handling/lucky.aspx , only the standard error page appeared instead of the custom error page.
How do I make the custom error page appear?