Help with Web.config


D

dennis

I Inherited a intranet server that has a web app in the iis root folder as well as many other web app that were created in there own folder, under the iis root folder.

My problem is that if a web.config is put in the root folder folder, even an empty one, all
the other apps start failing recieving a runtime error.

Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".


<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>

This baffles me as I thought the web.config in the lowest level folder is suppposed to have precedence.

Your help is appreciated.

Dennis




--------------= Posted using GrabIt =----------------
------= Binary Usenet downloading made easy =---------
-= Get GrabIt for free from http://www.shemes.com/ =-
 
Ad

Advertisements

A

Alexey Smirnov

I Inherited a intranet server that has a web app in the iis root folder as well as many other web app that were created in there own folder, under the iis root folder.

My problem is that if a web.config  is put in the root folder folder, even an empty one, all
the other apps start failing recieving a runtime error.

Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File -->
<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>

This baffles me as I thought the web.config in the lowest level folder is suppposed to have precedence.

It's not. You can create an own web application for each directory in
IIS or use <clear /> tag in child web.config to remove all elements
that were hierarchically inherited from the root level, or look at the
following post http://dotnetslackers.com/Security/re-56713_Stopping_ASP_NET_web_config_inheritance.aspx

Hope this helps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top