Thursday, March 17, 2016

When IIS serves blank pages instead of error messages

I noticed that my web site was serving completely blank pages instead of any kind of error when a user attempted to visit a nonexistent page. I had set an error document for code 404 in the IIS Manager, but it didn't help.

Some research turned up this Stack Overflow question, the top answer of which led me to the solution. Evidently, the error redirection feature in IIS requires a Windows feature, specifically Internet Information Services → World Wide Web Services → Common HTTP Features → HTTP Errors, which in some cases does not get enabled by default.

My site is actually hosted on a Windows Server 2008 machine, so the Windows Features dialog doesn't exist. The feature in question is a Role Service of the IIS (Web Server) role.

No comments:

Post a Comment