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. web.config in subfolder

web.config in subfolder

Scheduled Pinned Locked Moved ASP.NET
helpquestionlearning
8 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.
  • D Offline
    D Offline
    Diablo_m
    wrote on last edited by
    #1

    Hi all! Please help me in my problem. :) I'm developing a 'plugin' to the web-site. I can't change any files in root web-site :(. My aspx files are placed in ~/plugins/task/ folder. I create web.config in this folder with appSettings and user section. In code-behind file i tried to read application settings written in web.config, but i can't see them :((. My user section is also unavailable. Is there a way to accomplish my task or I should use resource files for my settings? :^)

    B 1 Reply Last reply
    0
    • D Diablo_m

      Hi all! Please help me in my problem. :) I'm developing a 'plugin' to the web-site. I can't change any files in root web-site :(. My aspx files are placed in ~/plugins/task/ folder. I create web.config in this folder with appSettings and user section. In code-behind file i tried to read application settings written in web.config, but i can't see them :((. My user section is also unavailable. Is there a way to accomplish my task or I should use resource files for my settings? :^)

      B Offline
      B Offline
      badgrs
      wrote on last edited by
      #2

      As far as I know, the web.config needs to be referenced in the root web.config in order to get loaded properly.

      D G 2 Replies Last reply
      0
      • B badgrs

        As far as I know, the web.config needs to be referenced in the root web.config in order to get loaded properly.

        D Offline
        D Offline
        Diablo_m
        wrote on last edited by
        #3

        I can't find any related information! My be you can give me some references or link where i can read about this?

        1 Reply Last reply
        0
        • B badgrs

          As far as I know, the web.config needs to be referenced in the root web.config in order to get loaded properly.

          G Offline
          G Offline
          ganti r
          wrote on last edited by
          #4

          For a web application this is not the case. Check the following link for detailed article on web.config. http://www.sitepoint.com/article/web-config-file-demystified The section relevant to this check "A Few Other Issues" " * A Web application can contain more than one Web.config file. The settings in a file apply to the directory in which it's located, and all child directories. Web.config files in child directories take precedence over the settings that are specified in parent directories. * Web.config files are protected by IIS, so clients cannot get to them. If you try to retrieve an existing http://mydomain.com/Web.config file, you'll be presented with an "Access denied" error message. * IIS monitors the Web.config files for changes and caches the contents for performance reasons. There's no need to restart the Web server after you modify a Web.config file. " Coming to the original issue, can you post your web.config file.

          i Think, i Wait, i Fast
          rAm

          D 1 Reply Last reply
          0
          • G ganti r

            For a web application this is not the case. Check the following link for detailed article on web.config. http://www.sitepoint.com/article/web-config-file-demystified The section relevant to this check "A Few Other Issues" " * A Web application can contain more than one Web.config file. The settings in a file apply to the directory in which it's located, and all child directories. Web.config files in child directories take precedence over the settings that are specified in parent directories. * Web.config files are protected by IIS, so clients cannot get to them. If you try to retrieve an existing http://mydomain.com/Web.config file, you'll be presented with an "Access denied" error message. * IIS monitors the Web.config files for changes and caches the contents for performance reasons. There's no need to restart the Web server after you modify a Web.config file. " Coming to the original issue, can you post your web.config file.

            i Think, i Wait, i Fast
            rAm

            D Offline
            D Offline
            Diablo_m
            wrote on last edited by
            #5

            here is my local web.config located in subfolder:

            G 1 Reply Last reply
            0
            • D Diablo_m

              here is my local web.config located in subfolder:

              G Offline
              G Offline
              ganti r
              wrote on last edited by
              #6

              Hi Diablo, I assume you have not renamed the file web.config to something else. In case you have renamed it, make it as web.config. If it is alright, I don't see any issue with the .config file. Might have to dig a bit little deep to find a fix.

              rAm i Think, i Wait, i Fast -- Siddartha

              D 1 Reply Last reply
              0
              • G ganti r

                Hi Diablo, I assume you have not renamed the file web.config to something else. In case you have renamed it, make it as web.config. If it is alright, I don't see any issue with the .config file. Might have to dig a bit little deep to find a fix.

                rAm i Think, i Wait, i Fast -- Siddartha

                D Offline
                D Offline
                Diablo_m
                wrote on last edited by
                #7

                Thanks! Now I managed to solve my problem

                G 1 Reply Last reply
                0
                • D Diablo_m

                  Thanks! Now I managed to solve my problem

                  G Offline
                  G Offline
                  ganti r
                  wrote on last edited by
                  #8

                  How did u solve?What was the cause?

                  rAm i Think, i Wait, i Fast -- Siddartha

                  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