App.config in a C# Class Library

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
<P>
App.config in a C# Class Library</P>
<P> </P>
<P>I have a class library that has the following App.config file in it.</P>
<P>-------------------------------------------------------------------------------</P>
<P>-------------------------------------------------------------------------------</P>
<P>Problem is, that when I attempt to get the eventLogName key value my class object like this:</P>
<P>-------------------------------------------------------------------------------</P>
<P>ConfigurationSettings.AppSettings["eventLogName"].ToString()</P>
<P>-------------------------------------------------------------------------------</P>
<P>It doesnt see the appSettings as having any keys at all.</P>
<P>I see the connectionStrings key, just not the appSettings key</P>
<P>weird....</P>
<P>thanks</P>
<P> </P>
<P>doug</P>
<P>
</P>

View the full article
 
Back
Top