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. web.config security settings

web.config security settings

Scheduled Pinned Locked Moved Web Development
securityquestion
6 Posts 4 Posters 1 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.
  • B Offline
    B Offline
    BLOEDHOND
    wrote on last edited by
    #1

    Hi How do I add the user "everyone" with full control to the security settings of my web.config file. I need to chane the web.config file via my web service so that I can set my connection string as required per client Regards

    H V K 3 Replies Last reply
    0
    • B BLOEDHOND

      Hi How do I add the user "everyone" with full control to the security settings of my web.config file. I need to chane the web.config file via my web service so that I can set my connection string as required per client Regards

      H Offline
      H Offline
      Hesham Amin
      wrote on last edited by
      #2

      DON'T !!! :doh: you can use info about the connecting client to construct the connection on the fly in code. But never change web.config from code. note that changing the connection srting per client makes you loose connection pooling benifits.


      Hesham A. Amin blog

      B 1 Reply Last reply
      0
      • B BLOEDHOND

        Hi How do I add the user "everyone" with full control to the security settings of my web.config file. I need to chane the web.config file via my web service so that I can set my connection string as required per client Regards

        V Offline
        V Offline
        Vasudevan Deepak Kumar
        wrote on last edited by
        #3

        I think the web.config is readonly in runtime 'cause the web application is forces a restart the it detects a changed web.config file. So either if you can change it I don't think its saved until the webapp restarts or the web.config is readonly in runtime.

        Vasudevan Deepak Kumar Personal Homepage Tech Gossips

        1 Reply Last reply
        0
        • H Hesham Amin

          DON'T !!! :doh: you can use info about the connecting client to construct the connection on the fly in code. But never change web.config from code. note that changing the connection srting per client makes you loose connection pooling benifits.


          Hesham A. Amin blog

          B Offline
          B Offline
          BLOEDHOND
          wrote on last edited by
          #4

          I have to This is a fire detection server that will be standing behind a firewall and no-one can have access to it from the outside. No one will consume the web service from the outside. However for my technicians to install the system on the mine they need to change the connection string to connect to the database as the path of the data base can change on a per install base Regards

          1 Reply Last reply
          0
          • B BLOEDHOND

            Hi How do I add the user "everyone" with full control to the security settings of my web.config file. I need to chane the web.config file via my web service so that I can set my connection string as required per client Regards

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

            I wrote and article which describes how to change the web config file programmatically. I think if you follow my article you can created a domain user that you set up as the identity of your app pool that your web service runs under. Then you could change the web.config. NOTE when the web.config is change the application will restart. If you are talking about the web service changing a different web sites web.config that is pretty dangerious, I would suggest a different solution if at all possible. http://www.codeproject.com/useritems/SingleWebConfigFile.asp[^] Hope that helps. Ben

            B 1 Reply Last reply
            0
            • K kubben

              I wrote and article which describes how to change the web config file programmatically. I think if you follow my article you can created a domain user that you set up as the identity of your app pool that your web service runs under. Then you could change the web.config. NOTE when the web.config is change the application will restart. If you are talking about the web service changing a different web sites web.config that is pretty dangerious, I would suggest a different solution if at all possible. http://www.codeproject.com/useritems/SingleWebConfigFile.asp[^] Hope that helps. Ben

              B Offline
              B Offline
              BLOEDHOND
              wrote on last edited by
              #6

              Hi Ihave looked at the article a while ago. Nice one, if I may say so, but it does not quite suite my needs. I just need to change an element in the connectionstringsettings to the connection string of my database. This connectionstring is unique per installation. If I change the security settings of the web.config file via Explorer then my code works well, and I can change the connection string as I please. I just need to change the security setting programmaticaly Regards

              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