Multi Web.config files

written by Amr ElGarhy on Friday, January 02 2009

Can we have multi web.config files in the same website?!

Yes you can "for example one web.config for root website and another one for a subfolder"

How can we do so with out conflict or getting errors?

- First you will need to config this subfolder as application in the IIS

- Second write <location path="." inheritInChildApplications="false"> before <system.web> and </location> after </system.web> in the root web.config file:

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

   <system.web> 

   ............ 

  </system.web>: 

</location> 

 

references:

http://msdn.microsoft.com/en-us/library/aa719558.aspx

http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_23438651.html

kick it on DotNetKicks.com

Similar Posts

  1. Deploying ajax wcf service on shared hosting.
  2. Websites and Web Projects
  3. Add reference to javascript file

Comments

  • codeguru on on 1.02.2009 at 8:06 AM

    codeguru avatar

    nice trick

  • .net flight on on 1.02.2009 at 8:09 AM

    .net flight avatar

    helped me too much, thanks

  • prof_nona on on 1.12.2009 at 9:04 AM

    prof_nona avatar

    Thanks alot and keep on :)

Post a comment

Options:

Size

Colors