<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="ExchangeDiagnosticsSection" type="Microsoft.Exchange.Data.ApplicationLogic.ExchangeDiagnosticsSection, Microsoft.Exchange.Data.ApplicationLogic, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
  </configSections>
  <ExchangeDiagnosticsSection>
    <DiagnosticsComponents>
      <DiagnosticsComponent name="AuditLogDiagnostics" implementation="Microsoft.Exchange.Servicelets.AuditLogSearch.AuditLogSearchHealthHandler, Microsoft.Exchange.AuditLogSearchServicelet, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" methodName="GetInstance" />
    </DiagnosticsComponents>
  </ExchangeDiagnosticsSection>
  <runtime>
    <generatePublisherEvidence enabled="false"/>
  </runtime>
  <system.net>
    <connectionManagement>
      <add address="*" maxconnection="40"/>
    </connectionManagement>
    <defaultProxy>
      <proxy usesystemdefault="true" bypassonlocal="true" />
      <bypasslist>
        <add address=".*" />
      </bypasslist>
    </defaultProxy>
  </system.net>
  <system.serviceModel>
    <bindings>
      <netTcpBinding>
        <binding
          name="MrsProxyClientTcpBinding"
          maxReceivedMessageSize="100000000"
          receiveTimeout="00:20:00"
          sendTimeout="00:20:00"
          transactionFlow="false"
          transferMode="Buffered" >          
          <readerQuotas maxDepth="32"
                  maxStringContentLength="35000000"
                  maxArrayLength="35000000"
                  maxBytesPerRead="4096"
                  maxNameTableCharCount="16384" />          
          <security mode="Transport">
            <transport
              clientCredentialType="Windows"
              protectionLevel="EncryptAndSign" />
          </security>
        </binding>        
      </netTcpBinding>
      <customBinding>
        <binding name="MrsProxyClientHttpsBinding"
                 receiveTimeout="00:00:50" 
                 sendTimeout="00:20:00">
          <reliableSession ordered="true" />
          <textMessageEncoding>
            <readerQuotas maxArrayLength="1048576" 
                          maxStringContentLength="1048576" />
          </textMessageEncoding>
          <httpsTransport authenticationScheme="Negotiate" 
                          maxReceivedMessageSize="8388608" />
        </binding>
      </customBinding>
    </bindings>
    <client>
      <endpoint 
          name="MrsProxyClientHttpsEndpoint" 
          address="https://RemoteHostName/EWS/mrsproxy.svc" 
          binding="customBinding"
          bindingConfiguration="MrsProxyClientHttpsBinding"
          contract="Microsoft.Exchange.MailboxReplicationService.IMailboxReplicationProxyService"
          behaviorConfiguration="MrsProxyEndpointBehavior"/>
      <endpoint 
          name="MrsProxyClientHttpsWsSecurityEndpoint" 
          address="https://RemoteHostName/EWS/mrsproxy.svc/WSSecurity" 
          binding="customBinding"
          bindingConfiguration="MrsProxyClientHttpsBinding"
          contract="Microsoft.Exchange.MailboxReplicationService.IMailboxReplicationProxyService"
          behaviorConfiguration="MrsProxyEndpointBehavior"/>
      <endpoint 
          name="MrsProxyClientTcpEndpoint" 
          address="net.tcp://RemoteHostName/Microsoft.Exchange.MailboxReplicationService.ProxyService" 
          binding="netTcpBinding"
          bindingConfiguration="MrsProxyClientTcpBinding"
          contract="Microsoft.Exchange.MailboxReplicationService.IMailboxReplicationProxyService"
          behaviorConfiguration="MrsProxyEndpointBehavior"/>
    </client>
    <behaviors>
      <endpointBehaviors>
        <behavior name="MrsProxyEndpointBehavior">
          <dataContractSerializer maxItemsInObjectGraph="2000000"/>
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <diagnostics performanceCounters="All" />
  </system.serviceModel>
  <appSettings>
    <add key="MinimumIOPortThreads" value="40" />
    <add key="SyncMigrationIsEnabled" value="true" />
    <add key="AuditLogSearchPollIntervalInMilliseconds" value="86400000"/>
  </appSettings>
</configuration>
