TAGS :Viewed: 9 - Published at: a few seconds ago

[ Web.config in website root is interfering with additional application Web.config (IIS) ]

I have 2 separate ASP.NET web applications setup in IIS that need to interact as one.

I created a New Website in IIS. I put the files for App1 in the root directory of the Website. I then created a directory called Admin and added App2 files. I right clicked the Admin directory in IIS and clicked Convert to Web Application.

It seems like the web.config in the root (App1) is interfering with the web.config within App2.

Is there a better way to set this up? Should both be their own applications within an empty Website? I kind of wanted to avoid this since I want the effect of www.mydomain.com for the main app and then www.mydomain.com/Admin for App2.

Answer 1

Your Admin website will inherit settings from parent (and therefore the root website) web.config.

You can explicitly override settings in the Admin web.config.

Also for configuration sections that have collections, you can often use clear to clear settings from the parent, e.g.:

  <add ... />

  <add ... />