Groups | Blog | Home
all groups > c# > february 2008 >

c# : access web.config from another dll


Marc Gravell
2/25/2008 8:59:26 PM
All dlls in the appdomain have access to the same coinfiguration; so
you DAL dll can simply use ConfigurationManager:
http://msdn2.microsoft.com/en-us/library/system.configuration.configurationmanager.connectionstrings.aspx

Tem
2/25/2008 9:45:40 PM
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
AddThis Social Bookmark Button