<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>{ Duane.Wingett } - Config Files</title>
    <link>http://www.duanewingett.info/</link>
    <description>.Net Code Monkey</description>
    <language>en-gb</language>
    <copyright>Duane Wingett</copyright>
    <lastBuildDate>Sat, 12 Apr 2008 19:03:24 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.0.7226.0</generator>
    <managingEditor>mail@duanewingett.info</managingEditor>
    <webMaster>mail@duanewingett.info</webMaster>
    <item>
      <trackback:ping>http://www.duanewingett.info/Trackback.aspx?guid=f40ec3ec-6713-43ec-8007-f3b4ade7b1d8</trackback:ping>
      <pingback:server>http://www.duanewingett.info/pingback.aspx</pingback:server>
      <pingback:target>http://www.duanewingett.info/PermaLink,guid,f40ec3ec-6713-43ec-8007-f3b4ade7b1d8.aspx</pingback:target>
      <dc:creator>Duane Wingett</dc:creator>
      <wfw:comment>http://www.duanewingett.info/CommentView,guid,f40ec3ec-6713-43ec-8007-f3b4ade7b1d8.aspx</wfw:comment>
      <wfw:commentRss>http://www.duanewingett.info/SyndicationService.asmx/GetEntryCommentsRss?guid=f40ec3ec-6713-43ec-8007-f3b4ade7b1d8</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I'm sure many of you are aware that you can override the connection string settings
in your <strong>DataAccess</strong> layer of your web application with connection
string settings in your <strong>Web.Config</strong>. We found this out recently and
found it very useful in an intranet application at work recently. However this week
one of the other developers required that he could override a setting the <strong>BusinessEntity</strong> layer
of his application from the <strong>App.Config</strong> in the console layer.
</p>
        <p>
A quick chat with Mr Google didn't turn up a solution for this, so with this in mind
all three of us quickly tried to return a working solution. I'm going to try to give
an example of what we did, incase it something others may find of use. First we create
a solution with two class library projects within it. The first will simulate the <strong>DataAccess</strong> layer
and the second will simulate the <strong>BusinessEntity</strong> layer in an application.
In the <strong>BusinessEntity</strong> project we will create a reference to the <strong>DataAccess</strong> project.
</p>
        <p>
Starting with the <strong>DataAccess</strong> project we will add an <strong>App.Config</strong> file
by creating a setting called "MySetting" in the <strong>Settings</strong> tab
of the project <strong>Properties</strong>. The setting scope will be set to
Application.
</p>
        <p>
          <img src="http://www.duanewingett.info/content/binary/ConfigurationOverride_Settings.jpg" border="0" />
        </p>
        <p>
This creates a new <strong>sectionGroup</strong> called <strong>applicationSettings</strong> and
a new section in the <strong>App.Config</strong> file and places the new setting in
their too.
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: #966633; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">&lt;?xml <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">version</span>=<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"1.0"</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">encoding</span>=<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"utf-8"</span> ?&gt;
&lt;configuration&gt; &lt;configSections&gt; &lt;sectionGroup <font color="#ff0000">name</font>=<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"applicationSettings"</span><br /><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">type</span>=<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"System.Configuration.ApplicationSettingsGroup,
System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"</span> &gt;
&lt;section <font color="#ff0000">name</font>=<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Playground.ConfigurationOverride.DataAccess.Properties.Settings"</span><br /><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">type</span>=<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"System.Configuration.ClientSettingsSection,
System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"</span><br /><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">requirePermission</span>=<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"false"</span> /&gt;
&lt;/sectionGroup&gt; &lt;/configSections&gt; &lt;applicationSettings&gt; &lt;Playground.ConfigurationOverride.DataAccess.Properties.Settings&gt;
&lt;setting <font color="#ff0000">name</font>=<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"MySetting"</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">serializeAs</span>=<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"String"</span>&gt;
&lt;value&gt;Setting in DataAccess&lt;/value&gt; &lt;/setting&gt; &lt;/Playground.ConfigurationOverride.DataAccess.Properties.Settings&gt;
&lt;/applicationSettings&gt; &lt;/configuration&gt;</span>
        </pre>
        <p>
Next we will add a simple class to the DataAccess project with a single static method
that will return the value of the setting we have just created.
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> System; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">namespace</span> Playground.ConfigurationOverride.DataAccess
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">class</span> SettingsHelper
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span> GetMySetting()
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span> Properties.Settings.Default.MySetting;
} } }</span>
        </pre>
        <p>
Next we will create anothe simple class, <strong>SettingsGetter</strong>, in
the but in the <strong>BusinessEntity</strong> layer this time. It will just return
the value returned from the <strong>SettingsHelper</strong> class in the <strong>DataAccess</strong> layer.
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">using</span> System; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">namespace</span> Playground.ConfigurationOverride.BusinessEntity
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">class</span> SettingsGetter
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">public</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">static</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">string</span> GetDataAccessSettingValue()
{ <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">return</span> DataAccess.SettingsHelper.GetMySetting();
} } }</span>
        </pre>
Next we need to create a presentation layer. So first off we will create a small web
application and add it to the solution, and grab a reference to the <strong>BusinessEntity</strong> layer.
Set the web site as the startup project. We will also add a <strong>Label</strong> to
the default webform and a <strong>Button</strong>. In the <strong>Page_Load</strong> handler
method populate the label text from the business entity method.<pre><span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">protected</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">void</span> Page_Load(<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">object</span> sender,
EventArgs e) { uxSettingsLabel.Text <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> Playground.ConfigurationOverride.BusinessEntity.SettingsGetter.GetDataAccessSettingValue();
}</span></pre><p>
...and run the application, and allow the <strong>Web.Config</strong> file to be created.
The value of the setting in the <strong>DataAccess</strong><strong>App.Config</strong> file
should be displayed.
</p><p>
 
</p><p><font size="1">More to follow soon...</font></p><img width="0" height="0" src="http://www.duanewingett.info/aggbug.ashx?id=f40ec3ec-6713-43ec-8007-f3b4ade7b1d8" /></body>
      <title>Override App.Config in the DataAccess layer with Web.Config or App.Config in the presentation layer.</title>
      <guid isPermaLink="false">http://www.duanewingett.info/PermaLink,guid,f40ec3ec-6713-43ec-8007-f3b4ade7b1d8.aspx</guid>
      <link>http://www.duanewingett.info/2008/04/12/OverrideAppConfigInTheDataAccessLayerWithWebConfigOrAppConfigInThePresentationLayer.aspx</link>
      <pubDate>Sat, 12 Apr 2008 19:03:24 GMT</pubDate>
      <description>&lt;p&gt;
I'm sure many of you are aware that you can override the connection string settings
in your &lt;strong&gt;DataAccess&lt;/strong&gt; layer of your web application with connection
string settings in your &lt;strong&gt;Web.Config&lt;/strong&gt;. We found this out recently and
found it very useful in an intranet application at work recently. However this week
one of the other developers required that he could override a setting the &lt;strong&gt;BusinessEntity&lt;/strong&gt; layer
of his application from the &lt;strong&gt;App.Config&lt;/strong&gt; in the console layer.
&lt;/p&gt;
&lt;p&gt;
A quick chat with Mr Google didn't turn up a solution for this, so with this in mind
all three of us quickly tried to return a working solution. I'm going to try to give
an example of what we did, incase it something others may find of use. First we create
a solution with two class library projects within it. The first will&amp;nbsp;simulate&amp;nbsp;the &lt;strong&gt;DataAccess&lt;/strong&gt; layer
and the second will simulate the &lt;strong&gt;BusinessEntity&lt;/strong&gt; layer in an application.
In the &lt;strong&gt;BusinessEntity&lt;/strong&gt; project we will create a reference to the &lt;strong&gt;DataAccess&lt;/strong&gt; project.
&lt;/p&gt;
&lt;p&gt;
Starting with the &lt;strong&gt;DataAccess&lt;/strong&gt; project we will add an &lt;strong&gt;App.Config&lt;/strong&gt; file
by&amp;nbsp;creating a setting called "MySetting"&amp;nbsp;in the &lt;strong&gt;Settings&lt;/strong&gt; tab
of the project &lt;strong&gt;Properties&lt;/strong&gt;. The setting&amp;nbsp;scope will be set to
Application.
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.duanewingett.info/content/binary/ConfigurationOverride_Settings.jpg" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
This creates a new &lt;strong&gt;sectionGroup&lt;/strong&gt; called &lt;strong&gt;applicationSettings&lt;/strong&gt; and
a new section in the &lt;strong&gt;App.Config&lt;/strong&gt; file and places the new setting in
their too.
&lt;/p&gt;
&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: #966633; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&amp;lt;?xml &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;version&lt;/span&gt;=&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"1.0"&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;encoding&lt;/span&gt;=&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"utf-8"&lt;/span&gt; ?&amp;gt;
&amp;lt;configuration&amp;gt; &amp;lt;configSections&amp;gt; &amp;lt;sectionGroup &lt;font color=#ff0000&gt;name&lt;/font&gt;=&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"applicationSettings"&lt;/span&gt; 
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;type&lt;/span&gt;=&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"System.Configuration.ApplicationSettingsGroup,
System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"&lt;/span&gt; &amp;gt;
&amp;lt;section &lt;font color=#ff0000&gt;name&lt;/font&gt;=&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"Playground.ConfigurationOverride.DataAccess.Properties.Settings"&lt;/span&gt; 
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;type&lt;/span&gt;=&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"System.Configuration.ClientSettingsSection,
System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"&lt;/span&gt; 
&lt;br&gt;
&lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;requirePermission&lt;/span&gt;=&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"false"&lt;/span&gt; /&amp;gt;
&amp;lt;/sectionGroup&amp;gt; &amp;lt;/configSections&amp;gt; &amp;lt;applicationSettings&amp;gt; &amp;lt;Playground.ConfigurationOverride.DataAccess.Properties.Settings&amp;gt;
&amp;lt;setting &lt;font color=#ff0000&gt;name&lt;/font&gt;=&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"MySetting"&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;serializeAs&lt;/span&gt;=&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4"&gt;"String"&lt;/span&gt;&amp;gt;
&amp;lt;value&amp;gt;Setting in DataAccess&amp;lt;/value&amp;gt; &amp;lt;/setting&amp;gt; &amp;lt;/Playground.ConfigurationOverride.DataAccess.Properties.Settings&amp;gt;
&amp;lt;/applicationSettings&amp;gt; &amp;lt;/configuration&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
Next we will add a simple class to the DataAccess project with a single static method
that will return the value of the setting we have just created.
&lt;/p&gt;
&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;using&lt;/span&gt; System; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;namespace&lt;/span&gt; Playground.ConfigurationOverride.DataAccess
{ &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;static&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;class&lt;/span&gt; SettingsHelper
{ &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;static&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;string&lt;/span&gt; GetMySetting()
{ &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;return&lt;/span&gt; Properties.Settings.Default.MySetting;
} } }&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
Next we will create anothe simple class, &lt;strong&gt;SettingsGetter&lt;/strong&gt;,&amp;nbsp;in
the but in the &lt;strong&gt;BusinessEntity&lt;/strong&gt; layer this time. It will just return
the value returned from the &lt;strong&gt;SettingsHelper&lt;/strong&gt; class in the &lt;strong&gt;DataAccess&lt;/strong&gt; layer.
&lt;/p&gt;
&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;using&lt;/span&gt; System; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;namespace&lt;/span&gt; Playground.ConfigurationOverride.BusinessEntity
{ &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;static&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;class&lt;/span&gt; SettingsGetter
{ &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;public&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;static&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;string&lt;/span&gt; GetDataAccessSettingValue()
{ &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;return&lt;/span&gt; DataAccess.SettingsHelper.GetMySetting();
} } }&lt;/span&gt;&lt;/pre&gt;
Next we need to create a presentation layer. So first off we will create a small web
application and add it to the solution, and grab a reference to the &lt;strong&gt;BusinessEntity&lt;/strong&gt; layer.
Set the web site as the startup project. We will also add a &lt;strong&gt;Label&lt;/strong&gt; to
the default webform and a &lt;strong&gt;Button&lt;/strong&gt;. In the &lt;strong&gt;Page_Load&lt;/strong&gt; handler
method populate the label text from the business entity method.&lt;pre&gt;&lt;span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;protected&lt;/span&gt; &lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;void&lt;/span&gt; Page_Load(&lt;span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;object&lt;/span&gt; sender,
EventArgs e) { uxSettingsLabel.Text &lt;span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent"&gt;=&lt;/span&gt; Playground.ConfigurationOverride.BusinessEntity.SettingsGetter.GetDataAccessSettingValue();
}&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;
...and run the application, and allow the &lt;strong&gt;Web.Config&lt;/strong&gt; file to be created.
The value of the setting in the &lt;strong&gt;DataAccess&lt;/strong&gt; &lt;strong&gt;App.Config&lt;/strong&gt; file
should be displayed.
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;font size=1&gt;More to follow soon...&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.duanewingett.info/aggbug.ashx?id=f40ec3ec-6713-43ec-8007-f3b4ade7b1d8" /&gt;</description>
      <comments>http://www.duanewingett.info/CommentView,guid,f40ec3ec-6713-43ec-8007-f3b4ade7b1d8.aspx</comments>
      <category>.Net</category>
      <category>Asp.Net</category>
      <category>C#</category>
      <category>Config Files</category>
      <category>XML</category>
    </item>
  </channel>
</rss>