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. Storing Setting files so they can be edited during runtime.

Storing Setting files so they can be edited during runtime.

Scheduled Pinned Locked Moved ASP.NET
sysadminbusinessbeta-testingquestioncode-review
3 Posts 2 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.
  • B Offline
    B Offline
    boy pockets
    wrote on last edited by
    #1

    I have a web app that has a number of class library projects (which have the business logic). Currently, these class libraries each have a Settings.settings file to contain application settings (like feedback messages and format strings). During runtime i want to be able to go onto the server and change the value of one of the settings. Essentially I want what is currently available for the web project - it has a Web.config file which has all the application settings. I am able to change these settings during runtime.

    C 1 Reply Last reply
    0
    • B boy pockets

      I have a web app that has a number of class library projects (which have the business logic). Currently, these class libraries each have a Settings.settings file to contain application settings (like feedback messages and format strings). During runtime i want to be able to go onto the server and change the value of one of the settings. Essentially I want what is currently available for the web project - it has a Web.config file which has all the application settings. I am able to change these settings during runtime.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Use the app settings in your web config instead, and use HttpContext.Current ( from memory ) to read those values. Nope, completely wrong. WebConfigurationManager.AppSettings("ConnectionString") for example reads <appSettings> <add key="connectionString" value="Data Source=xxx;User ID=sa;Password=yyyyy;Initial Catalog=zzzz"/> </appSettings> from a dll in my project.

      Christian Graus No longer a Microsoft MVP, but still happy to answer your questions.

      B 1 Reply Last reply
      0
      • C Christian Graus

        Use the app settings in your web config instead, and use HttpContext.Current ( from memory ) to read those values. Nope, completely wrong. WebConfigurationManager.AppSettings("ConnectionString") for example reads <appSettings> <add key="connectionString" value="Data Source=xxx;User ID=sa;Password=yyyyy;Initial Catalog=zzzz"/> </appSettings> from a dll in my project.

        Christian Graus No longer a Microsoft MVP, but still happy to answer your questions.

        B Offline
        B Offline
        boy pockets
        wrote on last edited by
        #3

        Hi, Thanks for your reply. Do you mean the Web.config file in the website? That is what i will resort to if I can't get my way, but I was hoping to still be able to use Settings.settings or something similar in the Class Library (not something in the website).

        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