Link to home
Create AccountLog in
Avatar of rodmjay
rodmjayFlag for United States of America

asked on

Using web config file from a DLL

I am creating a DLL library alongside my asp.net application.  I would like to use information from the Web.config file, how do you do that?
ASKER CERTIFIED SOLUTION
Avatar of existenz2
existenz2
Flag of Netherlands image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Have a look at ConfigurationSettings.Appsettings and you can use it from anywhere provided your web.config is defined in your web application

Rana
Avatar of rodmjay

ASKER

I do not believe that you can use appsettings from a DLL, since it is not running in the same application.  I am looking for cleaner way to do this and i believe there is a way to do this with the newest version of asp.net.  Does anyone know to do this?
The example code I have given solves your problem. I don't think there is a standard solution for this.