web.config parameters inside compiled ClassLibrary

  • Thread starter Thread starter Lupus
  • Start date Start date
L

Lupus

Hi folks,

I've created a class library, compiled as a .DLL-file to support my
ASP.NET webapplication. My .NET-application has some parameters (ie.
SQL connection string) stored in the web.config file. But I havent't
been able yet to use these parameters inside the class library ?

ConfigurationSettings.AppSettings() is not recognized, so I can't
compile the DLL with it...

Is it possible to retrieve these parameters from web.config from
inside a class library ?


Thx in advance!
Kind regards
Mathew
 
You may just need to Add Reference to System.Configuration in the class
library, and then use the ConfigurationManager.AppSettings syntax.
 
Back
Top