locked
multiple projects - 1 web.config RRS feed

  • Question

  • User-839293131 posted

    Hello - I have a website project and then a couple of class library projects. Each of these class library projects has an app.config file with a connection string in (it's the same connection string in each app.config in each file).

    When I build the project, the web.config file is the only config file I get and this contains the connection string.

     

    But - the class library projects compile into dlls with the connection strings hard coded into them.

    How do I get the compiled dlls to reference to connection string in web.config rather than compiling with hard coded connection strings?

    Tuesday, October 16, 2007 5:41 AM

Answers

  • User-1215918814 posted

    if you use system.configuration.configurationmanager, those dll's should reference the settings in web.config by default.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, October 16, 2007 10:17 AM