<?xml version="1.0"?>
<configuration>
  <configSections>
    <sectionGroup name="spring">
      <section name="context" type="Spring.Context.Support.WebContextHandler, Spring.Web" requirePermission="false"/>
      <section name="objects" type="Spring.Context.Support.DefaultSectionHandler, Spring.Core" requirePermission="false"/>
    </sectionGroup>
    <sectionGroup name="common">
      <section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" requirePermission="false"/>
    </sectionGroup>
  </configSections>
  <!-- to see logging output in the attached debugger -->
  <common>
    <logging>
      <factoryAdapter type="Common.Logging.Simple.TraceLoggerFactoryAdapter, Common.Logging">
        <arg key="level" value="ALL"/>
      </factoryAdapter>
    </logging>
  </common>
  <!--
    For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367.

    The following attributes can be set on the <httpRuntime> tag.
      <system.Web>
        <httpRuntime targetFramework="4.5.2" />
      </system.Web>
  -->
  <system.web>
    <securityPolicy>
      <trustLevel name="Custom" policyFile="web_mediumtrust.config"/>
    </securityPolicy>
    <trust level="Full"/>
    <!-- install Spring assemblies in GAC and change to level to 'Custom' to run in partial trust -->
    <globalization culture="en-US" uiCulture="en-US"/>
    <customErrors mode="Off"/>
    <compilation debug="true" targetFramework="4.5.2"/>
    <pages controlRenderingCompatibilityVersion="4.0">
      <controls>
        <add tagPrefix="spring" namespace="Spring.Web.UI.Controls" assembly="Spring.Web"/>
      </controls>
    </pages>
    <!--
    The following needs to be configured in order to enable Spring.NET Web Framework features
    -->
    <httpModules>
      <add name="SpringModule" type="Spring.Context.Support.WebSupportModule, Spring.Web"/>
      <!-- this custom module is only for DI demonstration purposes -->
      <add name="HtmlCommentAppender" type="HtmlCommentAppenderModule"/>
    </httpModules>
    <httpHandlers>
      <add verb="*" path="*.aspx" type="Spring.Web.Support.PageHandlerFactory, Spring.Web"/>
    </httpHandlers>
  </system.web>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules>
      <add name="SpringModule" type="Spring.Context.Support.WebSupportModule, Spring.Web"/>
      <add name="HtmlCommentAppender" type="HtmlCommentAppenderModule"/>
    </modules>
    <handlers>
      <add name="SpringPageHandler" verb="*" path="*.aspx" type="Spring.Web.Support.PageHandlerFactory, Spring.Web"/>
    </handlers>
  </system.webServer>
  <!-- demonstrates how to configure IHttpModule instances -->
  <spring>
    <context>
      <resource uri="config://spring/objects"/>
    </context>
    <objects xmlns="http://www.springframework.net">
      <!-- configure our custom HttpModule -->
      <object name="HttpApplicationConfigurer" type="Spring.Context.Support.HttpApplicationConfigurer, Spring.Web">
        <property name="ModuleTemplates">
          <dictionary>
            <entry key="HtmlCommentAppender">
              <!-- this name must match the module name -->
              <object>
                <!-- select "view source" in your browser on any page to see the appended html comment -->
                <property name="AppendText" value="My configured comment!"/>
              </object>
            </entry>
          </dictionary>
        </property>
      </object>
    </objects>
  </spring>
</configuration>