views:

33

answers:

1

Merging the web.config files of a legacy ASP.NET App and a new MVC app has pretty much defeated me.

Is there a way I can build my solutions with projects sectioned off into subfolders?

EG (each project to have its own web.config):

~/PlainVanilla/ /* original asp.net app - still some life in old dogs */

~/PlainVanilla/StrawberryMVC /* juicy, suculent new MVC app */

~/PlainVanilla/GrumpyOldCMS /* Telerik Sitefinity app that takes
                                                   forever to compile */

This structure produces a lot of errors caused by a subfolder web.config overriding a settings in the ~/PlainVanilla/web.config that are not allowed.

I understand that this is hard to reply to comprehensively in the limited space of SO answer, so recommended books, blogs and articles would be appreciated.

This is a hole in my skill set and I would like to plug it.

+2  A: 

You can use the

<remove /> and <clear /> tags in the child web.configs to help remove sections that are causing problems due to inheritance.

Depending on how much you need to change (sounds like a lot), you can surround with <location> tags to disable inheritance all together.

<location path="." inheritInChildApplications="false">
    <sectionName>
    </sectionName>   
  </location>

Do some searching on remove in web.config and web.config inheritance, and you should find plenty of ways to use these.

Taylor