tags:

views:

82

answers:

1

Senario:

I'm running IIS7 on Win Server 2008 Web Edition

I have a MVC application at the route of the website (main app)

The website HOST is domain.com

I've created a virtual application /testapp with has an ASP.Net application (sub app)

Problem:

when I navigate to http://domain.com the main app works as expected but when I navigate to http://domain.com/testapp the sub app seems to be running but processing the main app web.config.

Some of the errors I was getting involved missing dlls that only the main app required - this could be solved by copying the dlls into the sub app bin folder but isn't an ideal solution.

Question:

I don't think this is an MVC/ASP.Net issue but instead an ISS7 one. How do I configure IIS7 so that these two application don't interfere with each other?

+1  A: 

This problem is by design due to inheritance of web.config files. You have a couple of solutions:

  1. Move the site elements at the root of the site into a application subfolder that sits side by side with your other application and remove as much of the parent's web.config as possible.
  2. Copy all the elements in the parent web.config to the child web.config that are needed and use the location elements to block inheritance in the child:
< location path="." inheritInChildApplications="false" >
    < system.web >
    ...
    </ system.web >
</ location >
Thomas
option #2 doesn't seem to work as I've added it but parent web.config is still being processed.
Damien McGivern