Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Can We Have Multiple Web.Config files in same project but in different folders

Can We Have Multiple Web.Config files in same project but in different folders

Scheduled Pinned Locked Moved ASP.NET
csharpasp-net
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anonymous
    wrote on last edited by
    #1

    Hi, I am developing an asp.net application i require two web.config files but in different folders of same application. First Is that possible Second how if anyone knows kindly reply

    J 1 Reply Last reply
    0
    • A Anonymous

      Hi, I am developing an asp.net application i require two web.config files but in different folders of same application. First Is that possible Second how if anyone knows kindly reply

      J Offline
      J Offline
      jasncab
      wrote on last edited by
      #2

      It is my understanding that the web.config applies to each application. If you have a subfolder in which you want its own config then you will need to make it its own application within IIS. This usually has little impact on the application but will possibly have some deployment issues since the root of the application will be in a different memory space than the sub folder application. So your answer is no (because they will need to become seperate applications and you used that word specifically). If you can make the subfolder its own application using IIS or VS.NET then yes ;) http://www.jasncab.com/huberblog :: Jason Huber

      S 1 Reply Last reply
      0
      • J jasncab

        It is my understanding that the web.config applies to each application. If you have a subfolder in which you want its own config then you will need to make it its own application within IIS. This usually has little impact on the application but will possibly have some deployment issues since the root of the application will be in a different memory space than the sub folder application. So your answer is no (because they will need to become seperate applications and you used that word specifically). If you can make the subfolder its own application using IIS or VS.NET then yes ;) http://www.jasncab.com/huberblog :: Jason Huber

        S Offline
        S Offline
        Sebastien Lachance
        wrote on last edited by
        #3

        In fact you can :) Each subfolder config files overrides it's parent's folder. Check here : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconaspnetconfiguration.asp My Blog

        J 1 Reply Last reply
        0
        • S Sebastien Lachance

          In fact you can :) Each subfolder config files overrides it's parent's folder. Check here : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconaspnetconfiguration.asp My Blog

          J Offline
          J Offline
          jasncab
          wrote on last edited by
          #4

          Turns out the documentation is correct. In the past I have had trouble with this and thus I posted my solution. Although it remains true that you can just make the subfolder its own application this might lead to the subfolder not inheriting the parents web.config settings. This is something you might want. Good information!

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups