Place the exact name/value setting that you have below in your app.config
for the application.
If there is no application, such as if this is a generic library, then this
will have to be part of the installation or instructions to the user to
ensure this gets added to the app.config.
DLLs can use configuration settings, but they come from the app.config file.
"Charlie" <cf*******@radiustravel.com> wrote in message
news:O5**************@TK2MSFTNGP09.phx.gbl...
Interesting. Then how do you store application configuration settings
that you want to be able to change without recompiling DLL?
Charlie
"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:ec****************@TK2MSFTNGP15.phx.gbl... You cannot map a config file to a DLL, only an EXE or website.
"Charlie" <cf*******@radiustravel.com> wrote in message
news:OY**************@TK2MSFTNGP11.phx.gbl... Hi:
I created a config file to retrieve DSN at runtime from a C# library
project (DLL). I name the file same as DLL (libRADIUS.config). Here is the
contents of the file...
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="dsn" value="server=arwen;uid=;pwd=;database=dbRadius" />
</appSettings>
</configuration>
I'm accessing from a class using...
string dsn = ConfigurationSettings.AppSettings["dsn"];
The problem is that it always returns null. Does anybody know why?
Thanks,
Charlie