It would appear that on my brand new Windows Server 2008 with IIS7, customErrors is not working.

We have customErrors set to RemoteOnly in the web.config on our Asp.Net sites and applications. However, no matter what we do, it would appear that our sites act like it's set to On and we can't get any detailed messages showing up on our applications when remoted into our servers.

I'm not entirely sure how to trace where this is being overrided, or if there is something in the way the server is configured that would make the server think the request is internal? How does this actually resolve correctly, anyway?

Any help is appreciated...

Our network admin has added domains to our hosts file to direct applications to the IP address.

link|improve this question

60% accept rate
How are you browsing the site? http: //localhost ? – mfinni Jun 22 '11 at 22:11
No, we have multiple sites. We're browsing either from IIS, or just in IE using the domain name. We had no problem with this using our old Server 2003 or IIS 6 – Atomiton Jun 22 '11 at 22:15
feedback

1 Answer

You need to use the httpErrors element for IIS 7.

<configuration>
   <system.webServer>
      <httpErrors errorMode="DetailedLocalOnly" />
   </system.webServer>
</configuration>

http://www.iis.net/ConfigReference/system.webServer/httpErrors

link|improve this answer
We added httpErrors into web.config and we got Error Status: 500 back. Shouldn't "customErrors" also work, though? I'm not sure this is a problem with the application. I feel it's something in the Server Config. However, without more knowledge of how this mechanism actually works, it's difficult to direct the Network Admin in the right direction. – Atomiton Jun 23 '11 at 17:34
@Atromiton If there is an error being thrown then it is most likely a problem in the application. If you added my snip-it as is to your web.config file you probably created a duplicate root node (configuration) which resulted in the 500 error. One thought would be to modify the IIS configuration so you can get to the site through the local 127.0.01 IP Address. See if that helps with your custom errors issue. – Jeff Jun 25 '11 at 14:04
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.