INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Custom Errors Not Working

Custom Errors Not Working

(OP)
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

RE: Custom Errors Not Working

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.

RE: Custom Errors Not Working

(OP)
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.

RE: Custom Errors Not Working

Are you using nested web.config files. If so, you can be overriding these entries.

RE: Custom Errors Not Working

(OP)
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.

RE: Custom Errors Not Working

Did you make any machine.config changes that might affect it?

RE: Custom Errors Not Working

(OP)
not at all.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close