<?xml version="1.0"?>
<configuration>
  <appSettings>
    <add key="CcaIPAddress" value="localhost" />
    <add key="ExternalCcaIPAddress" value="XXX" />
    <add key="CcaPort" value="980" />
    <add key="Timeout" value="55000" />
    <add key="DefaultCcaWorkspace" value="7" />
    <add key="DefaultCcaLocation" value="-1" />
    <add key="AllowedDomains" value="*" />
    <add key="ClientSettingsProvider.ServiceUri" value="" />
    <add key="Company" value="Askia" />
  </appSettings>
  <system.web>
    <!-- disable shadow copies for dynamical loading of AskiaCore -->
    <hostingEnvironment shadowCopyBinAssemblies="false" />
    <compilation>
      <assemblies>
        <remove assembly="AskiaCoreInternal32" />
        <remove assembly="AskiaCoreInternal64" />
      </assemblies>
    </compilation>
    <membership defaultProvider="ClientAuthenticationMembershipProvider">
      <providers>
        <add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
      </providers>
    </membership>
    <roleManager defaultProvider="ClientRoleProvider" enabled="true">
      <providers>
        <add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
      </providers>
    </roleManager>
  </system.web>
  <system.diagnostics>
    <sources>
      <source name="System.ServiceModel" switchValue="Critical, Error, Warning">
        <listeners>
          <add name="ServiceModelTraceListener">
            <filter type="" />
          </add>
        </listeners>
      </source>
      <!--
      <source name="System.ServiceModel.MessageLogging">
        <listeners>
          <add name="ServiceModelMessageLoggingListener">
            <filter type=""/>
          </add>
        </listeners>
      </source>-->
    </sources>
    <sharedListeners>
      <add initializeData="c:\log\Tracelog.svclog" type="System.Diagnostics.XmlWriterTraceListener, System, &#xD;&#xA;      Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="ServiceModelTraceListener" traceOutputOptions="Timestamp">
        <filter type="" />
      </add>
      <!--
      <add initializeData="c:\log\Messages.svclog"
      type="System.Diagnostics.XmlWriterTraceListener, System, 
      Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
      name="ServiceModelMessageLoggingListener" traceOutputOptions="Timestamp">
        <filter type=""/>
      </add>-->
    </sharedListeners>
    <trace autoflush="true" />
  </system.diagnostics>
  <!-- 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>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true">
    </serviceHostingEnvironment>
    <extensions>
      <behaviorExtensions>
        <add name="crossOriginResourceSharingBehavior" type="CcaAPI.Helpers.EnableCrossOriginResourceSharingBehavior, CcaAPI" />
      </behaviorExtensions>
    </extensions>
    <bindings>
      <basicHttpBinding>
        <binding name="basicBinding" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" transferMode="Streamed">
          <readerQuotas maxArrayLength="2147483647" />
        </binding>
      </basicHttpBinding>
      <wsDualHttpBinding>
        <binding name="TheDualBindingConfig" textEncoding="utf-8" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="2.00:00:00" sendTimeout="00:10:00" bypassProxyOnLocal="false" maxReceivedMessageSize="2147483647">
          <readerQuotas maxArrayLength="2147483647" />
          <reliableSession inactivityTimeout="2.00:00:00" />
          <security mode="None" />
        </binding>
      </wsDualHttpBinding>
      <wsHttpBinding>
        <binding name="TheBindingConfig" closeTimeout="00:01:05" openTimeout="00:01:05" sendTimeout="00:01:05" maxReceivedMessageSize="2147483647">
          <readerQuotas maxArrayLength="2147483647" />
          <security mode="None" />
        </binding>
      </wsHttpBinding>
      <webHttpBinding>
        <binding name="WebjsonHttp" transferMode="Streamed" contentTypeMapper="CcaAPI.RawContentTypeMapper, CcaAPI,Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" crossDomainScriptAccessEnabled="true" />
      </webHttpBinding>
	  <netTcpBinding>
		<binding name="TheTcpBinding" sendTimeout="00:01:00">
		<security mode="None" />
		</binding>
	  </netTcpBinding>
    </bindings>
    <client />
    <services>
      <service behaviorConfiguration="ServiceBehavior" name="CcaAPI.Service">
        <endpoint address="" behaviorConfiguration="" binding="wsDualHttpBinding" bindingConfiguration="TheDualBindingConfig" name="Service" contract="CcaAPI.Interfaces.IService">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" name="MetaData" contract="IMetadataExchange" />
        <endpoint behaviorConfiguration="" binding="wsDualHttpBinding" bindingConfiguration="TheDualBindingConfig" name="Objects" contract="CcaAPI.Interfaces.IDuplexCcaObjects">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint behaviorConfiguration="" binding="wsDualHttpBinding" bindingConfiguration="TheDualBindingConfig" name="Reports" contract="CcaAPI.Interfaces.ICcaReports">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint binding="wsDualHttpBinding" bindingConfiguration="TheDualBindingConfig" name="Quota" contract="CcaAPI.Interfaces.IDuplexCcaQuota">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8733/Design_Time_Addresses/CcaAPI/Service/" />
          </baseAddresses>
        </host>
		<endpoint behaviorConfiguration="" binding="netTcpBinding" bindingConfiguration="TheTcpBinding" name="Service.TCP" contract="CcaAPI.Interfaces.IService">
			<identity>
			<dns value="localhost" />
			</identity>
			</endpoint>
			<endpoint behaviorConfiguration="" binding="netTcpBinding" bindingConfiguration="TheTcpBinding" name="Objects.TCP" contract="CcaAPI.Interfaces.IDuplexCcaObjects">
			<identity>
			<dns value="localhost" />
			</identity>
			</endpoint>
			<endpoint behaviorConfiguration="" binding="netTcpBinding" bindingConfiguration="TheTcpBinding" name="Reports.TCP" contract="CcaAPI.Interfaces.ICcaReports">
			<identity>
			<dns value="localhost" />
			</identity>
			</endpoint>
			<endpoint behaviorConfiguration="" binding="netTcpBinding" bindingConfiguration="TheTcpBinding" name="Quota.TCP" contract="CcaAPI.Interfaces.IDuplexCcaQuota">
			<identity>
			<dns value="localhost" />
			</identity>
		</endpoint>
      </service>
    </services>
    <behaviors>
      <endpointBehaviors>
        <behavior name="JsonBehavior">
          <webHttp helpEnabled="true" automaticFormatSelectionEnabled="false" />
          <crossOriginResourceSharingBehavior />
        </behavior>
      </endpointBehaviors>
      <serviceBehaviors>
        <behavior name="ServiceBehavior">
          <useRequestHeadersForMetadataAddress />
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
          <dataContractSerializer maxItemsInObjectGraph="2147483647" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <diagnostics>
      <messageLogging logEntireMessage="true" logMalformedMessages="true" logMessagesAtServiceLevel="false" logMessagesAtTransportLevel="true" maxMessagesToLog="2147483647" maxSizeOfMessageToLog="2147483647" />
    </diagnostics>
  </system.serviceModel>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
  </startup>
  
</configuration>






