I just got setup on my first Windows Server 2008 / IIS7.5 server for a contest I am participating in. I can\'t for the life of me figure out how to turn OFF error ha
After some more extensive searching, I found the answer here:
http://blogs.msdn.com/webdevelopertips/archive/2009/08/24/tip-93-did-you-know-php-and-custom-error-pages-configuration.aspx
The solution is to manually edit your web.config file with this custom "httpErrors" entry:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors existingResponse="PassThrough" />
</system.webServer>
</configuration>
However, due to IIS 7.0 "lockdown" feature you might get a "This configuration section cannot be used at this path. This happens when the section is locked at a parent level." error. To solve that, execute the following in the command prompt:
cd C:\Windows\System32\inetsrv
appcmd unlock config /section:httpErrors
In IIS Manager -> Site -> Error Pages, right-click each error page and choose ‘Remove’.
Unfortunately there is not a way to tell IIS not to interfere from the script side, so it's always an annoying deployment issue.