web.config parameters inside compiled ClassLibrary

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
 
K

KJ

You may just need to Add Reference to System.Configuration in the class
library, and then use the ConfigurationManager.AppSettings syntax.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top