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. dynamic URL authorization with web.config?

dynamic URL authorization with web.config?

Scheduled Pinned Locked Moved ASP.NET
securitytutorialquestion
6 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.
  • K Offline
    K Offline
    Kleindahl
    wrote on last edited by
    #1

    Hi all. I was wondering how to dynamicly change the web.config file to allow or deny users of a website. Here i'm thinking of the: <[allow|deny] users roles verbs /> The reason for wanting to do this, is that i have coded a CMS System, and i want to give the administrator the possibility of making the website private while constructing content. Does anyone know how to do this? Regards Christian

    K 1 Reply Last reply
    0
    • K Kleindahl

      Hi all. I was wondering how to dynamicly change the web.config file to allow or deny users of a website. Here i'm thinking of the: <[allow|deny] users roles verbs /> The reason for wanting to do this, is that i have coded a CMS System, and i want to give the administrator the possibility of making the website private while constructing content. Does anyone know how to do this? Regards Christian

      K Offline
      K Offline
      kubben
      wrote on last edited by
      #2

      Here is the basic web.config settings: Where path is pointing to a subfolder in your website. Or you can point to "." for the whole web site. Hope that helps. Ben

      K 1 Reply Last reply
      0
      • K kubben

        Here is the basic web.config settings: Where path is pointing to a subfolder in your website. Or you can point to "." for the whole web site. Hope that helps. Ben

        K Offline
        K Offline
        Kleindahl
        wrote on last edited by
        #3

        Hi Ben First off, i'd like to thank you for trying to help me out with my problem. I am not sure if i made it clear enough what i want to do. I know how to create an entry in the web.config, as you showed in your reply. What i want to do is to edit it "on-the-fly" from a web administration. e.g., ticking a checkbox should make it say and ticking it again, make it: i hope that i have maded myself more clear now, and hope that yout can help? -- Christian

        N K 2 Replies Last reply
        0
        • K Kleindahl

          Hi Ben First off, i'd like to thank you for trying to help me out with my problem. I am not sure if i made it clear enough what i want to do. I know how to create an entry in the web.config, as you showed in your reply. What i want to do is to edit it "on-the-fly" from a web administration. e.g., ticking a checkbox should make it say and ticking it again, make it: i hope that i have maded myself more clear now, and hope that yout can help? -- Christian

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #4

          Use the IIS manager?


          only two letters away from being an asset

          1 Reply Last reply
          0
          • K Kleindahl

            Hi Ben First off, i'd like to thank you for trying to help me out with my problem. I am not sure if i made it clear enough what i want to do. I know how to create an entry in the web.config, as you showed in your reply. What i want to do is to edit it "on-the-fly" from a web administration. e.g., ticking a checkbox should make it say and ticking it again, make it: i hope that i have maded myself more clear now, and hope that yout can help? -- Christian

            K Offline
            K Offline
            kubben
            wrote on last edited by
            #5

            If your web site is .net 2.0 there are some things that you can do with a web.config. The downside is the work it takes to get the web.config to reload and see your changes and the fact that re-loading the web.config will re-start the site which will affect everyone currently logged in. I would say your time is probably better spent elsewhere and either manually change the config file or use iis manager. Ben

            K 1 Reply Last reply
            0
            • K kubben

              If your web site is .net 2.0 there are some things that you can do with a web.config. The downside is the work it takes to get the web.config to reload and see your changes and the fact that re-loading the web.config will re-start the site which will affect everyone currently logged in. I would say your time is probably better spent elsewhere and either manually change the config file or use iis manager. Ben

              K Offline
              K Offline
              Kleindahl
              wrote on last edited by
              #6

              thx alot for the reply ... both of you. One problem for me is that the website is in a hosted enviroment so i don't have the possibility of altering the ISS. I do know that changing the web.config will restart the application, and that is a sideeffect that i can live with. Then its up to the end-user to make the change at a suitable time. But i am still very much interested in a solution? -- Christian

              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