Load App.Config data into a DLL

Here is my way of getting a DotNet DLL to load its app.config file.

AppDomain.CurrentDomain.SetData ("APP_CONFIG_FILE",ConfigFile);

Where ConfigFile is the full path to your application's app.config file.(c:\test\myapp.config)

As a side note you may need to call ConfigurationManager.RefreshSection

in order to see your values.
Comments [1]
Wednesday, 28 May 2008 08:54:14 (Pacific Standard Time, UTC-08:00)
I'm not sure what a congig is, but this totally helped me out. Thanks!
All comments require the approval of the site owner before being displayed.
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, strike, strong, sub, super, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview