2

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.

Armstrongest
  • 189
  • 1
  • 4
  • 9
  • 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 – Armstrongest Jun 22 '11 at 22:15

1 Answers1

5

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

Jeff
  • 1,008
  • 1
  • 10
  • 14
  • 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. – Armstrongest Jun 23 '11 at 17:34
  • 1
    @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