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. Multiple web.config file in a project

Multiple web.config file in a project

Scheduled Pinned Locked Moved ASP.NET
tutorial
5 Posts 5 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.
  • M Offline
    M Offline
    Milind Panchal
    wrote on last edited by
    #1

    while surfing on internet I found, we can use multiple web.config files in a project. So I want to know how it will work. Which web.config file will refer. Plz give example

    L Z A J 4 Replies Last reply
    0
    • M Milind Panchal

      while surfing on internet I found, we can use multiple web.config files in a project. So I want to know how it will work. Which web.config file will refer. Plz give example

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Milind Panchal wrote:

      while surfing on internet I found, we can use multiple web.config files in a project.

      Did you try https://www.google.com/search?q=multiple+web.config+files[^]?

      Veni, vidi, abiit domum

      1 Reply Last reply
      0
      • M Milind Panchal

        while surfing on internet I found, we can use multiple web.config files in a project. So I want to know how it will work. Which web.config file will refer. Plz give example

        Z Offline
        Z Offline
        ZurdoDev
        wrote on last edited by
        #3

        I would recommend against it unless you need to. You can't have multiples in the same folder for obvious reasons but sometimes you may want to overwrite a setting in the parent web.config in a subfolder. You may want to research web.config inheritance or better yet, just avoid doing it.

        There are only 10 types of people in the world, those who understand binary and those who don't.

        1 Reply Last reply
        0
        • M Milind Panchal

          while surfing on internet I found, we can use multiple web.config files in a project. So I want to know how it will work. Which web.config file will refer. Plz give example

          A Offline
          A Offline
          Amir Hamza Md Kayes
          wrote on last edited by
          #4

          The root web.config will come first. then if you want to override the settings then you can have more web config in specific folder(View/WebPage folder). if any folder does not have the 2nd web.config then root settings will be affected for your request.

          1 Reply Last reply
          0
          • M Milind Panchal

            while surfing on internet I found, we can use multiple web.config files in a project. So I want to know how it will work. Which web.config file will refer. Plz give example

            J Offline
            J Offline
            joginder banger
            wrote on last edited by
            #5

            First of All this is my first if any mistake or wrong message forgive me. coming to Answer, of course we can used the multiple web.config in asp .net web project. Suppose in my project fifty Pages(50), some page are Access only Admin and Some Page access Valid user like that we can used our account information in Code project Account and some are access every user like that About Us page,Login page and So on.My project Pages are divided three parts and Make a Three Folder in Project like name "Admin","Valid User" and Every user. In Admin Folder Add Web.config and Edit the Web.config some change are

            <authorization>
            <allow users="*" roles="admin"/>
            <deny users="?"/>

            </authorization>
            

            after than save this web.config.This step are do every folder and save project. I hope my Bit information try solve your problem.

            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