IIS7 ErrorMode DetailedLocalOnly

IIS7 injects a generic error page for all non-Asp.NET errors (e.g. asp, php, etc.).

To turn it off globally, run the following on the server at the command prompt:

%windir%\system32\inetsrv\appcmd.exe set config 
    -section:system.webServer/httpErrors -errorMode:Detailed

To turn it back on again:

%windir%\system32\inetsrv\appcmd.exe set config 
    -section:system.webServer/httpErrors -errorMode:DetailedLocalOnly

More: http://learn.iis.net/page.aspx/267/how-to-use-http-detailed-errors-in-iis7/