<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="ACSConfig" type="IM.Lib.Configuration.IMConfigurationManager" allowLocation="true" allowDefinition="Everywhere" allowExeDefinition="MachineToApplication" overrideModeDefault="Allow" restartOnExternalChanges="true" requirePermission="true" />

    <sectionGroup name="elmah">
      <section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" />
      <section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" />
      <section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" />
      <section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" />
    </sectionGroup>
  </configSections>
  <ACSConfig configSource="settings\entwicklung_lokal.config" />
  <appSettings file="">
    <clear />
  </appSettings>
  <connectionStrings />
  <system.diagnostics>
    <trace autoflush="true" indentsize="4">
      <listeners>
        <add name="XPO" />
        <remove name="Default" />
      </listeners>
    </trace>
    <sources>
      <source name="System.ServiceModel.MessageLogging" switchValue="Warning, ActivityTracing">
        <listeners>
          <add name="wcf" />
        </listeners>
      </source>
    </sources>
    <sharedListeners>
      <add name="XPO" type="NLog.NLogTraceListener, NLog" />
      <add name="wcf" type="NLog.NLogTraceListener, NLog" />
    </sharedListeners>
    <switches>
      <add name="XPO" value="3" />
    </switches>
  </system.diagnostics>
  <!--
    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.7.2" />
      </system.Web>
  -->
  <system.web>
    <!--
            Legen Sie beim Kompilieren debug="true" fest, um 
            Debugsymbole in die kompilierte Seite einzufügen. 
            Da dies die Leistung beeinträchtigt, sollte der 
            Wert nur beim Entwickeln auf "true" gesetzt werden.
        -->
    <compilation debug="true" targetFramework="4.7.2" />
    <!-- fehlerausgabe aktivieren -->
    <customErrors mode="Off" />
    <!-- authentifizierung deaktivieren -->
    <authentication mode="Windows" />
    <authorization>
      <allow users="*" />
    </authorization>

    <httpModules>
      <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
      <add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
      <add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" />
    </httpModules>
    <!-- Muss aktiviert werden, damit mit APPTEST der Test mit HTML -> TEXT funktioniert-->
    <!--<httpRuntime requestValidationMode="2.0" />-->
    <!-- 20MB in kilobytes, default is 4096 or 4MB-->
    <httpRuntime maxRequestLength="20480" />
  </system.web>
  <system.serviceModel>
    <!-- wcf -> Kommentarzeichen in Section diagnostics entfernen, falls man im Debug auch die Webservice Aufrufe sehen will -->
    <!--<diagnostics>
      <messageLogging
           logEntireMessage="true"
           logMalformedMessages="true"
           logMessagesAtServiceLevel="true"
           logMessagesAtTransportLevel="false"
           maxMessagesToLog="10000000"
           maxSizeOfMessageToLog="10000000"/>
    </diagnostics>-->
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
    <protocolMapping>
      <!-- aktiviere das http protokoll -->
      <add scheme="http" binding="basicHttpBinding" />
      <!-- aktiviere das https protokoll mit einer speziellen binding configuration -->
      <!--<add scheme="https" binding="basicHttpBinding" bindingConfiguration="SSLBinding" />-->
      <!-- aktivere die restlichen protokolle, die normalerweise auch aktiv sind -->
      <add scheme="net.tcp" binding="netTcpBinding" />
      <add scheme="net.pipe" binding="netNamedPipeBinding" />
      <add scheme="net.msmq" binding="netMsmqBinding" />
    </protocolMapping>
    <bindings>
      <basicHttpBinding>
        <!-- standard binding fuer die http services -->
        <binding maxReceivedMessageSize="5000000" />
        <!-- spezielles  binding fuer die https services -->
        <binding name="SSLBinding" maxReceivedMessageSize="5000000">
          <security mode="Transport">
            <transport clientCredentialType="None" />
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <useRequestHeadersForMetadataAddress />
          <!-- diese zeile muss aktivert werden, damit der service die metadaten exportiert. das funktioniert aber nicht bei https -->
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="false" />
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
  <location path="configuration">
    <system.web>
      <identity impersonate="true" />
      <authorization>
        <deny users="?" />
      </authorization>
    </system.web>
    <system.webServer>
      <handlers>
        <add verb="POST,GET,HEAD" path="configuration/config.ashx" name="ConfigurationHandlerFactory" type="IM.Lib.Configuration.Web.ConfigurationHandlerFactory,IM.Lib.Configuration.Web" />
      </handlers>
    </system.webServer>
  </location>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Win32.Registry" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" />
        <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Security.Principal.Windows" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" />
        <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Text.Encoding.CodePages" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" />
        <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules>
      <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" />
      <add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" preCondition="managedHandler" />
      <add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" preCondition="managedHandler" />
    </modules>
  </system.webServer>
  <elmah>
    <!--
        See http://code.google.com/p/elmah/wiki/SecuringErrorLogPages for 
        more information on remote access and securing ELMAH.
    -->
    <errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/log" />
    <security allowRemoteAccess="false" />
  </elmah>
  <location path="elmah.axd" inheritInChildApplications="false">
    <system.web>
      <httpHandlers>
        <add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" />
      </httpHandlers>
      <!-- 
        See http://code.google.com/p/elmah/wiki/SecuringErrorLogPages for 
        more information on using ASP.NET authorization securing ELMAH. -->

      <authorization>
        <deny users="*" />
      </authorization>
    </system.web>
    <system.webServer>
      <handlers>
        <add name="ELMAH" verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" preCondition="integratedMode" />
      </handlers>
    </system.webServer>
  </location>
</configuration>