Make IIS 7 Custom Error Pages Similar to Old Versions

Well, the goodness of being a support engineer is that you can receive both “Holy Sh*t” and “Thanks a ton” from the same guy.smile_regular

IIS 7 does introduce a new custom error mode, as documented in the following article,

How to Use HTTP Detailed Errors in IIS 7.0

You must pay much attention to digest the words. Otherwise, confusions can happen.

One simplest confusion is like this,

As a developer, you set up Visual Studio and IIS 7 on a Windows Vista machine. Then you configure custom error pages as usual. But, WHAT! Why in the browser you still see the ugly error page by IIS?

Please don’t mess up your configuration. Actually all you need is to change errorMode from DetailedLocalOnly to Custom in applicationHost.config.

If you rather use IIS Manager, please do the following,

  1. Find the web site,
  2. Click Error Pages icon in the middle.
  3. Click Edit Feature Settings… button in the left.
  4. Now please choose Custom error pages.

It’s simple, and I think most developers will like this non-default setting.

But why the IIS team set DetailedLocalOnly as default? The intention is part of the article mentioned above, so please read the article through and master the key points it states.

Personally speaking, I believe this mode is great for the deployment environment.

Skip to main content