I have modified my web.config file in my asp.net web application so that I am showing a custom error page:
<configuration>
<system.web>
...snip
<customErrors mode="On" defaultRedirect="WebForms/ErrorPage.aspx">
<error statusCode="404" redirect="WebForms/ErrorPageNotFound.aspx" />
</customErrors>
</system.web>
</configuration>
When I run the site on IIS I get the following error:
Error code: 0x800700b7
Config section 'system.web/customErrors' already defined.
Sections must only appear once per config file.
See the help topic <location> for exceptions
Clearly I have some config hierarchy at play here but I don't know which file I need to look at (I have 276 web.config files on my machine) - can someone point me in the right direction.
When I find the file can I just rem out the top level customErrors section or is this going to cause an issue for other web applications on the same machine that don't have customErrors defined?