IIS 7 Custom Error Page Not Showing

Posted: December 6, 2011 in Uncategorized
Tags: ,

As I recreated a production environment on my local development platform, a requirement was to assign a custom 404 Error Page. The web server is IIS (Internet Information Services) 7 on production and development.

In IIS Manager, I’d click the website name, double-click the “Error Pages” icon and then double-click the 404 Status Code row. I would change the “Execute a URL on this site” value for the URL to the 404 ColdFusion page I needed. This exactly replicates what I saw on production.

However, when I would go to the URL I had binded to the site (http://mysite.local), the default IIS error page would show. I checked, rechecked and re-verified the settings to no avail. Then I noticed this “Edit Feature Settings…” link under the Actions menu on the right of the Error Pages page. This is where I found my solution.

Apparently you can get different error displays if you are locally browsing the site as opposed to normal (remote) traffic. Here’s the fix:

  1. Open Internet Information Services (IIS) Manager
  2. Click your website name
  3. Double-click the “Error Pages” icon
  4. Click the “Edit Feature Settings…” link under Actions on the right column
  5. Change the “Error Responses” value to “Custom error pages” (the default is Detailed errors for local requests and custom error pages for remote requests)

The above setting will always display your intended custom error page even if you are browsing locally.

Advertisements
Comments
  1. This helped me solve my challenge, thank you.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s