Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom Errors Not Working

Status
Not open for further replies.

dvannoy

MIS
May 4, 2001
2,765
US
I'm trying to setup a custom error section in my web.config file. I've been researching how to do this and have tried several examples but can't seem to make this work. I'm trying to get rid of the yellow application error screens that could show.

This is my latest web.config entry.

<system.web>
<customErrors mode="On" defaultRedirect="~/ErrorPages/Error.aspx">
<error statusCode="401" redirect="~/ErrorPages/401.aspx" />
<error statusCode="404" redirect="~/ErrorPages/404.aspx" />
</customErrors>


any help would be appreciated.

Thanks
 
So what is the problem? Is it that your custom error pages are not showing?
If so, make sure your 401 and 404 pages are in the ErrorPages folder. That folder should be in the ROOT of your web.
 
yes, the error pages do not show. I'm still getting the IIS error pages not the custom pages. The folder is located in the root of my web and the pages are in the folder.
 
Are you using nested web.config files. If so, you can be overriding these entries.
 
My web.config file is at the root of my application. I did not change the location at all from the default. Seems like it is getting overridden like your saying.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top