applicationSettings and Web.config
- by Eric J.
I have a DLL that provides logging that I use for WebForms projects and now wish to use it in an ASP.Net MVC 2 project.
Some aspects of that DLL are configured in app.config:
<configuration>
<configSections>
<section name="Tools.Instrumentation.Properties.Settings"
type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
requirePermission="false" />
</sectionGroup>
</configSections>
<applicationSettings>
<Tools.Instrumentation.Properties.Settings>
<setting name="LogLevel" serializeAs="String">
<value>DEBUG</value>
</setting>
<setting name="AppName" serializeAs="String">
<value>MyApp</value>
</setting>
<setting name="Port" serializeAs="String">
<!--value>33333</value-->
<value>0</value>
</setting>
</Tools.Instrumentation.Properties.Settings>
</configuration>
However, when I create a similar entry in Web.config, I get the error:
Unrecognized configuration section
applicationSettings
My two-part question:
How do I make this config entry work in Web.config?
Where can I read up on the conceptual differences between WinForms configuration and ASP.Net configuration?