<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
        <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
    </configSections>

    <appSettings>
        <add key="service-dir" value="/opt/deki/bin" />
	<add key="root-uri" value="http://localhost/@api" />
        <add key="apikey" value="12345" />
        <add key="script" value="/opt/deki/bin/mindtouch.deki.startup.xml" />
    </appSettings>
    
    <connectionStrings>
  		<add name="connectionstring" providerName="System.Data.SqlClient"
  			 connectionString="Server=(local);Database=admtest;Trusted_Connection=False;uid=sa;pwd=whatever;" /> <!-- VIOLATION -->
  		<add name="connectionstring2" providerName="System.Data.SqlClient"
  			 connectionString="Server=(local);Database=admtest;Trusted_Connection=False;uid=sa;password = whatever;" /> <!-- VIOLATION -->
 	</connectionStrings>

    <system.web>
        <httpHandlers>
            <add verb="*" path="*" 
                  type="MindTouch.Dream.Http.HttpHandler, mindtouch.core"/> 
        </httpHandlers>
	<!--<customErrors mode="Off"/>-->
		<authentication mode="Windows|Forms|Passport|None">
  			<forms name="name"
       			loginUrl="url" 
       			protection="All|None|Encryption|Validation"
       			timeout="30" path="/" >
     			<credentials passwordFormat="Clear|SHA1|MD5">
      				 <user name="username" password="password" /> <!-- VIOLATION -->
     			</credentials>
   			</forms>
   			<passport redirectUrl="internal"/>
		</authentication>
	
    </system.web>

    <system.net>
        <connectionManagement>
            <add address="*" maxconnection="16" />
        </connectionManagement>
    </system.net>

    <log4net>
        <appender name="RollingFile-trace" type="log4net.Appender.RollingFileAppender, log4net">
            <file value="logs/trace.log" />
            <appendToFile value="true" />
            <maximumFileSize value="100KB" />
            <maxSizeRollBackups value="2" />

            <layout type="log4net.Layout.PatternLayout">
                <conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
            </layout>
        </appender>

        <appender name="RollingFile-info" type="log4net.Appender.RollingFileAppender, log4net">
            <threshold value="INFO" />
            <file value="logs/info.log" />
            <appendToFile value="true" />
            <maximumFileSize value="100KB" />
            <maxSizeRollBackups value="4" />

            <layout type="log4net.Layout.PatternLayout">
                <conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
            </layout>
        </appender>

        <appender name="RollingFile-warn" type="log4net.Appender.RollingFileAppender, log4net">
            <threshold value="WARN" />
            <file value="logs/warning.log" />
            <appendToFile value="true" />
            <maximumFileSize value="100KB" />
            <maxSizeRollBackups value="4" />

            <layout type="log4net.Layout.PatternLayout">
                <conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
            </layout>
        </appender>

        <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
            <layout type="log4net.Layout.PatternLayout">
                <conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
            </layout>
        </appender>

        <appender name="OutputDebugStringAppender" type="log4net.Appender.TraceAppender" >
            <layout type="log4net.Layout.PatternLayout">
                <param name="ConversionPattern" value="%date [%thread] %-5level %logger - %message%newline" />
            </layout>
        </appender>

        <!-- Set root logger level to DEBUG and its only appender to A1 -->
        <root>
            <level value="DEBUG" />
            <appender-ref ref="RollingFile-trace" />
            <appender-ref ref="RollingFile-info" />
            <appender-ref ref="RollingFile-warn" />
            <appender-ref ref="ConsoleAppender" />
            <appender-ref ref="OutputDebugStringAppender" />
        </root>
    </log4net>
</configuration>
