access web.config from another dll

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tem

    #1

    access web.config from another dll

    my DAL is in a separate dll/project than the website project.

    how would I go about accessing/referencing a connectstring in the web.config
    file in the website project ?

    so I don't have to hard code the connect string in the code file of the DAL
    dll.

    Tem

  • Marc Gravell

    #2
    Re: access web.config from another dll

    All dlls in the appdomain have access to the same coinfiguration; so
    you DAL dll can simply use ConfigurationMa nager:
    http://msdn2.microsoft.com/en-us/lib...onstrings.aspx

    Marc

    Comment

    Working...