<?xml version="1.0" encoding="utf-8" ?>
<configuration>

  <system.web>
    <compilation debug="true" />
  </system.web>
  <!-- When deploying the service library project, the content of the config file must be added to the host's 
  app.config file. System.Configuration does not support config files for libraries. -->
  <system.serviceModel>


    <bindings>
      <wsDualHttpBinding>
        <binding name="RequestUserName">
          <security>
            <message clientCredentialType="UserName" />
          </security>
        </binding>
      </wsDualHttpBinding>
    </bindings>
    <services>
      <service behaviorConfiguration="CustomerDeskOperationsBehavior"
        name="RootPaApp.RootPAService">
        <endpoint address="Service" binding="wsDualHttpBinding" bindingConfiguration="RequestUserName"
          name="Service" contract="RootPaApp.RootPAServiceIfc" />
        <endpoint address="mex" binding="mexHttpBinding" name="mex" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8732/Design_Time_Addresses/RootPA/Service1/" />
          </baseAddresses>
          <timeouts closeTimeout="00:01:00" />
        </host>
      </service>
    </services>

    <behaviors>
      <serviceBehaviors>
        <behavior name="CustomerDeskOperationsBehavior">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
          <serviceCredentials>
            <serviceCertificate findValue="RootPA" storeLocation="LocalMachine"
              storeName="TrustedPeople" x509FindType="FindBySubjectName" />
            <userNameAuthentication userNamePasswordValidationMode="Custom"
              customUserNamePasswordValidatorType="RootPaApp.DistributorValidator, tbaseprovisioning" />
          </serviceCredentials>
        </behavior>
      </serviceBehaviors>
    </behaviors>

  </system.serviceModel>

  <system.diagnostics>
    <trace autoflush="true" />
    <sources>
      <source name="System.ServiceModel"
              switchValue="Information, ActivityTracing"
              propagateActivity="true">
        <listeners>
          <add name="sdt"
              type="System.Diagnostics.XmlWriterTraceListener"
              initializeData= "rootpa.e2e" />
        </listeners>
      </source>
    </sources>
  </system.diagnostics>

</configuration>