Question

Im using a asp.net 4.0 project. My file structure looks like this

RootSite
 -Web.Config
 -WebService (WebApplication)
  -Web.Config

Now the WebService seems to get some parts of the web.config from the RootSite, the problem here is

<configuration><system.webServer>

So i tryed to place this around that section <location path="." inheritInChildApplications="false"> but that had the result of making a httpHandler only to function in the root directory...

So is there any solution to this? i don't understand why my webservice's web.config is inheriting from the root's web.config..

Was it helpful?

Solution

This is the way web configs work by design. It allows defining common properties at a higher level and custom properties at a lower level

Most of the time, the higher the level, the lesser the number of config sections in the web.config, you may be in a case where your root web.config contains sections that should be defined at a lower level

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top