﻿<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <appSettings>
    <!-- services -->
    <add key="DataService_AssemblyPath" value="#{Xbap.Settings.Services.DataServiceAssemblyPath}" />
    <add key="DataService_AssemblyPath_IsAbsolute" value="#{Xbap.Settings.Services.DataServiceAssemblyPathIsAbsolute}" />
    <add key="FamilyDataService_ClassName" value="Crossroads.ProxyService.FamilyDataServiceWrapper" />
    <add key="InventoryDataService_ClassName" value="Crossroads.ProxyService.InventoryDataServiceWrapper" />
    <add key="CommonDataService_ClassName" value="Crossroads.ProxyService.CommonDataServiceWrapper" />
    <add key="DocumentGenerationDataService_ClassName" value="Crossroads.ProxyService.DocumentGenerationDataServiceWrapper" />
    <add key="DataSyncDataService_ClassName" value="Crossroads.ProxyService.DataSyncDataServiceWrapper" />
    <add key="VersioningDataService_ClassName" value="Crossroads.ProxyService.VersioningDataServiceWrapper" />
    <add key="CertificationDataService_ClassName" value="Crossroads.ProxyService.CertificationDataServiceWrapper" />
    <add key="CarePlanDataService_ClassName" value="Crossroads.ProxyService.CarePlanDataServiceWrapper" />
    <add key="LoginDataService_ClassName" value="Crossroads.ProxyService.LoginDataServiceWrapper" />
    <add key="SecurityDataService_ClassName" value="Crossroads.ProxyService.SecurityDataServiceWrapper" />
    <add key="FoodDataService_ClassName" value="Crossroads.ProxyService.FoodDataServiceWrapper" />
    <add key="VendorDataService_ClassName" value="Crossroads.ProxyService.VendorDataServiceWrapper" />
    <add key="RedemptionDataService_ClassName" value="Crossroads.ProxyService.RedemptionDataServiceWrapper" />
    <add key="AppointmentDataService_ClassName" value="Crossroads.ProxyService.AppointmentDataServiceWrapper" />
    <add key="FinanceDataService_ClassName" value="Crossroads.ProxyService.FinanceDataServiceWrapper" />
    <!-- security -->
    <add key="CrossroadsSecureServiceEncryptionKey" value="QcYSBqR9qxJUCpoo1GLdakyttBX69du7DSnrYjJdrK4=" />
    <add key="CrossroadsPhalconServiceUriEncryptionKey" value="#{Xbap.Settings.Security.CrossroadsPhalconServiceUriEncryptionKey}" />
    <add key="FamilyDataServiceMockFileLocation" value="#{Xbap.Settings.Services.FamilyDataServiceMockFileLocation}" />
    <add key="SecurityDataServiceMockFileLocation" value="#{Xbap.Settings.Services.SecurityDataServiceMockFileLocation}" />
    <add key="ClientSettingsProvider.ServiceUri" value="#{Xbap.Settings.Services.ClientSettingsProviderServiceUri}" />
    <!-- offline configuration -->
    <add key="IsHubServerFileName" value="#{Xbap.Settings.Offline.IsHubServerFileName}" />
    <add key="OfflineServerFileName" value="#{Xbap.Settings.Offline.OfflineServerFileName}" />
    <!-- logging -->
    <add key="LogSaver_AssemblyPath" value="Crossroads.Logging.dll" />
    <add key="LoggingQueuePath" value=".\private$\nc-xr-logger-Production-NC" />
    <add key="LogSaver_ClassName" value="#{Xbap.Settings.Logging.LogSaverClassName}" />
    <add key="LogSaver_AssemblyPathIsAbsolute" value="#{Xbap.Settings.Logging.LogSaverAssemblyPathIsAbsolute}" />
    <!-- caching -->
    <add key="CacheSettings" value="Crossroads.Clinic.View.Dashboard,10,30,True|Crossroads.Clinic.View.Shell,10,30,True|Crossroads.Model.Child,10,30,True|Crossroads.Model.Woman,10,30,True|Crossroads.Model.Family,10,300,True|Crossroads.Model.Clinic,5,600,True|Crossroads.Model.CachingTest,10,30,True|Crossroads.Model.CachingTest2,5,180,True" />
    <add key="CacheCleanupInterval" value="600" />
    <add key="CacheMaximumDiskSpaceUsage" value="60" />
    <add key="CacheUtilizesIsolatedStorage" value="Y" />
    <!-- login/account -->
    <add key="PrepopulateLoginName" value="#{Xbap.Settings.Login.PrepopulateLoginName}" />
    <add key="PasswordRetrievalUrl" value="#{Xbap.Settings.Login.PasswordRetrievalUrl}" />
    <add key="PasswordChangeUrl" value="#{Xbap.Settings.Login.PasswordChangeUrl}" />
    <!-- resources/files -->
    <add key="AssessmentQuestionTypes_XmlPath" value="#{Xbap.Settings.Resources.AssessmentQuestionTypesXmlPath}" />
    <add key="RightsandResponsibilities_TextPath" value="#{Xbap.Settings.Resources.RightsAndResponsibilitiesTextPath}" />
    <add key="ReleaseForm_TextPath" value="#{Xbap.Settings.Resources.ReleaseFormTextPath}" />
    <add key="ReturnAgreement_TextPath" value="#{Xbap.Settings.Resources.ReturnAgreementTextPath}" />
    <add key="UploadedDirectory" value="\\storageacctwicncprod.file.core.windows.net\files\xr-files" />
    <!-- urls -->
    <add key="HelpSystemURL" value="#{Xbap.Settings.Urls.HelpSystemUrl}" />
    <add key="WicDefaultLogoPath" value="#{Xbap.Settings.Urls.WicDefaultLogoPath}" />
    <!-- reports -->
    <add key="ReportsViewerUrl" value="#{Xbap.Settings.Reports.ReportsViewerUrl}" />
    <add key="CrossroadsReportsUriEncryptionKey" value="#{Xbap.Settings.Reports.CrossroadsReportsUriEncryptionKey}" />
	  <add key="ReportsBrowser" value="#{Xbap.Settings.Reports.ReportsBrowser}" />
    <add key="ReportSearchPath" value="#{Xbap.Settings.Reports.ReportSearchPath}" />
    <!-- update -->
    <add key="ApplicationUpdateStartHour" value="#{Xbap.Settings.Update.ApplicationUpdateStartHour}" />
    <add key="ApplicationUpdateTimeSpan" value="#{Xbap.Settings.Update.ApplicationUpdateTimeSpan}" />
    <!--cash value benefit override-->
    <add key="CvbOverrideStartDate" value="#{Xbap.Settings.Cvb.CvbOverrideStartDate}" />
    <add key="CvbOverrideEndDate" value="#{Xbap.Settings.Cvb.CvbOverrideEndDate}" />
    <add key="CvbOverrideQuantity" value="#{Xbap.Settings.Cvb.CvbOverrideQuantity}" />
    <add key="CvbOverrideQuantity2" value="#{Xbap.Settings.Cvb.CvbOverrideQuantity2}" />
    <add key="CvbOverrideQuantity3" value="#{Xbap.Settings.Cvb.CvbOverrideQuantity3}" />
    <add key="CvbOverrideQuantity4" value="#{Xbap.Settings.Cvb.CvbOverrideQuantity4}" />
    <!-- other -->
    <add key="ConfigurationRefreshWaitTimeInMinutes" value="#{Xbap.Settings.Other.ConfigurationRefreshWaitTimeInMinutes}" />
    <add key="ShowClientType" value="#{Xbap.Settings.Other.ShowClientType}" />
  </appSettings>
  <system.diagnostics>
    <sources>
      <source name="DefaultSource" switchName="DefaultSwitch">
        <listeners>
          <add name="FileLog" />
          <!-- uncomment to write to the application event log -->
          <!--<add name="EventLog"/>-->
        </listeners>
      </source>
      <source name="System.ServiceModel" switchValue="Information" propagateActivity="true">
        <listeners>
          <add name="ServiceModelTraceListener" type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" initializeData="C:\logs\wcf-client.svclog" />
        </listeners>
      </source>
    </sources>
    <switches>
      <add name="DefaultSwitch" value="Information" />
      <!--  0-off, 1-error, 2-warn, 3-info, 4-verbose -->
      <add name="SyncTracer" value="1" />
    </switches>
    <trace autoflush="true">
      <listeners>
        <add name="TestListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="C:\SyncTracerLog.txt" />
      </listeners>
    </trace>
    <sharedListeners>
      <add name="FileLog" type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" initializeData="FileLogWriter" />
      <!-- uncomment to write to the application event log -->
      <!-- <add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="Crossroads" />  -->
    </sharedListeners>
  </system.diagnostics>
  <system.serviceModel>
    <bindings>
      <customBinding>
        <binding name="BinaryHttpBindingForFileService">
          <binaryMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16" maxSessionSize="2048">
            <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
          </binaryMessageEncoding>
          <security allowInsecureTransport="True" authenticationMode="UserNameOverTransport">
            <localClientSettings maxClockSkew="Infinite" />
            <localServiceSettings maxClockSkew="Infinite" />
            <secureConversationBootstrap>
              <localClientSettings maxClockSkew="Infinite" />
              <localServiceSettings maxClockSkew="Infinite" />
            </secureConversationBootstrap>
          </security>
          <httpsTransport manualAddressing="false" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647" allowCookies="false" authenticationScheme="Anonymous" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" keepAliveEnabled="true" maxBufferSize="2147483647" proxyAuthenticationScheme="Anonymous" realm="" transferMode="Streamed" unsafeConnectionNtlmAuthentication="false" useDefaultWebProxy="true" />
        </binding>
        <binding name="HttpBindingSecureTimeSkew" closeTimeout="10:05:00" openTimeout="10:01:00" receiveTimeout="10:01:00" sendTimeout="10:01:00">
          <binaryMessageEncoding maxReadPoolSize="2147483647" maxWritePoolSize="2147483647" maxSessionSize="2048">
            <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="2147483647" />
          </binaryMessageEncoding>
          <security authenticationMode="UserNameOverTransport">
            <localClientSettings maxClockSkew="Infinite" />
            <localServiceSettings maxClockSkew="Infinite" />
            <secureConversationBootstrap>
              <localClientSettings maxClockSkew="Infinite" />
              <localServiceSettings maxClockSkew="Infinite" />
            </secureConversationBootstrap>
          </security>
          <httpsTransport manualAddressing="false" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" allowCookies="false" authenticationScheme="Anonymous" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" keepAliveEnabled="true" maxBufferSize="2147483647" proxyAuthenticationScheme="Anonymous" realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false" useDefaultWebProxy="true" />
        </binding>
      </customBinding>
    </bindings>
    <client>
      <!-- wcf service endpoints -->
      <endpoint address="#{Xbap.Wcf.Client.Endpoints.AppointmentDataService}" behaviorConfiguration="EndpointBehavior" binding="customBinding" bindingConfiguration="HttpBindingSecureTimeSkew" contract="AppointmentDataService.IAppointmentDataService" name="WSHttpBinding_IAppointmentDataService">
        <identity>
          <dns value="local" />
        </identity>
      </endpoint>
      <endpoint address="#{Xbap.Wcf.Client.Endpoints.CarePlanDataService}" behaviorConfiguration="EndpointBehavior" binding="customBinding" bindingConfiguration="HttpBindingSecureTimeSkew" contract="CarePlanDataService.ICarePlanDataService" name="WSHttpBinding_ICarePlanDataService">
        <identity>
          <dns value="local" />
        </identity>
      </endpoint>
      <endpoint address="#{Xbap.Wcf.Client.Endpoints.CertificationDataService}" behaviorConfiguration="EndpointBehavior" binding="customBinding" bindingConfiguration="HttpBindingSecureTimeSkew" contract="CertificationDataService.ICertificationDataService" name="WSHttpBinding_ICertificationDataService">
        <identity>
          <dns value="local" />
        </identity>
      </endpoint>
      <endpoint address="#{Xbap.Wcf.Client.Endpoints.CommonDataService}" behaviorConfiguration="EndpointBehavior" binding="customBinding" bindingConfiguration="HttpBindingSecureTimeSkew" contract="CommonDataService.ICommonDataService" name="WSHttpBinding_ICommonDataService">
        <identity>
          <dns value="local" />
        </identity>
      </endpoint>
      <endpoint address="#{Xbap.Wcf.Client.Endpoints.FileService}" behaviorConfiguration="EndpointBehavior" binding="customBinding" bindingConfiguration="BinaryHttpBindingForFileService" contract="CrossroadsFileService.ICrossroadsFileService" name="HttpsBinding_ICrossroadsFileService">
        <identity>
          <dns value="local" />
        </identity>
      </endpoint>
      <endpoint address="#{Xbap.Wcf.Client.Endpoints.DataSyncDataService}" behaviorConfiguration="EndpointBehavior" binding="customBinding" bindingConfiguration="HttpBindingSecureTimeSkew" contract="DataSyncDataService.IDataSyncDataService" name="WSHttpBinding_IDataSyncDataService">
        <identity>
          <dns value="local" />
        </identity>
      </endpoint>
      <endpoint address="#{Xbap.Wcf.Client.Endpoints.DocumentGenerationDataService}" behaviorConfiguration="EndpointBehavior" binding="customBinding" bindingConfiguration="HttpBindingSecureTimeSkew" contract="DocumentGenerationDataService.IDocumentGenerationDataService" name="WSHttpBinding_IDocumentGenerationDataService">
        <identity>
          <dns value="local" />
        </identity>
      </endpoint>
      <endpoint address="#{Xbap.Wcf.Client.Endpoints.FamilyDataService}" behaviorConfiguration="EndpointBehavior" binding="customBinding" bindingConfiguration="HttpBindingSecureTimeSkew" contract="FamilyDataService.IFamilyDataService" name="WSHttpBinding_IFamilyDataService">
        <identity>
          <dns value="local" />
        </identity>
      </endpoint>
      <endpoint address="#{Xbap.Wcf.Client.Endpoints.FinanceDataService}" behaviorConfiguration="EndpointBehavior" binding="customBinding" bindingConfiguration="HttpBindingSecureTimeSkew" contract="FinanceDataService.IFinanceDataService" name="WSHttpBinding_IFinanceDataService">
        <identity>
          <dns value="local" />
        </identity>
      </endpoint>
      <endpoint address="#{Xbap.Wcf.Client.Endpoints.FoodDataService}" behaviorConfiguration="EndpointBehavior" binding="customBinding" bindingConfiguration="HttpBindingSecureTimeSkew" contract="FoodDataService.IFoodDataService" name="WSHttpBinding_IFoodDataService">
        <identity>
          <dns value="local" />
        </identity>
      </endpoint>
      <endpoint address="#{Xbap.Wcf.Client.Endpoints.InventoryDataService}" behaviorConfiguration="EndpointBehavior" binding="customBinding" bindingConfiguration="HttpBindingSecureTimeSkew" contract="InventoryDataService.IInventoryDataService" name="WSHttpBinding_IInventoryDataService">
        <identity>
          <dns value="local" />
        </identity>
      </endpoint>
      <endpoint address="#{Xbap.Wcf.Client.Endpoints.LogSaverService}" behaviorConfiguration="EndpointBehavior" binding="customBinding" bindingConfiguration="HttpBindingSecureTimeSkew" contract="LogSaverService.ILogSaver" name="WSHttpBinding_ILogSaverService">
        <identity>
          <dns value="local" />
        </identity>
      </endpoint>
      <endpoint address="#{Xbap.Wcf.Client.Endpoints.RedemptionDataService}" behaviorConfiguration="EndpointBehavior" binding="customBinding" bindingConfiguration="HttpBindingSecureTimeSkew" contract="RedemptionDataService.IRedemptionDataService" name="WSHttpBinding_IRedemptionDataService">
        <identity>
          <dns value="local" />
        </identity>
      </endpoint>
      <endpoint address="#{Xbap.Wcf.Client.Endpoints.SecurityDataService}" behaviorConfiguration="EndpointBehavior" binding="customBinding" bindingConfiguration="HttpBindingSecureTimeSkew" contract="SecurityDataService.ISecurityDataService" name="WSHttpBinding_ISecurityDataService">
        <identity>
          <dns value="local" />
        </identity>
      </endpoint>
      <endpoint address="#{Xbap.Wcf.Client.Endpoints.SyncService}" behaviorConfiguration="EndpointBehavior" binding="customBinding" bindingConfiguration="HttpBindingSecureTimeSkew" contract="SyncService.ISyncService" name="WSHttpBinding_ISyncService">
        <identity>
          <dns value="local" />
        </identity>
      </endpoint>
      <endpoint address="#{Xbap.Wcf.Client.Endpoints.VendorDataService}" behaviorConfiguration="EndpointBehavior" binding="customBinding" bindingConfiguration="HttpBindingSecureTimeSkew" contract="VendorDataService.IVendorDataService" name="WSHttpBinding_IVendorDataService">
        <identity>
          <dns value="local" />
        </identity>
      </endpoint>
      <endpoint address="#{Xbap.Wcf.Client.Endpoints.VersioningDataService}" behaviorConfiguration="EndpointBehavior" binding="customBinding" bindingConfiguration="HttpBindingSecureTimeSkew" contract="VersioningDataService.IVersioningDataService" name="WSHttpBinding_IVersioningDataService">
        <identity>
          <dns value="local" />
        </identity>
      </endpoint>
      <endpoint address="#{Xbap.Wcf.Client.Endpoints.LoginDataService}" behaviorConfiguration="EndpointBehavior" binding="customBinding" bindingConfiguration="HttpBindingSecureTimeSkew" contract="LoginDataService.ILoginDataService" name="WSHttpBinding_ILoginDataService">
        <identity>
          <dns value="local" />
        </identity>
      </endpoint>
    </client>
    <extensions>
      <behaviorExtensions>
        <add name="exceptionMarshalling" type="Crossroads.Framework.WCF.ExceptionMarshallingElement, Crossroads.Framework" />
        <add name="SecurityEndpoint" type="Crossroads.ProxyService.WCF.SecurityBehaviorExtentionElement, Crossroads.ProxyService" />
        <add name="SessionEndpoint" type="Crossroads.ProxyService.WCF.SessionBehaviorExtensionElement, Crossroads.ProxyService" />
      </behaviorExtensions>
    </extensions>
    <behaviors>
      <endpointBehaviors>
        <behavior name="EndpointBehavior">
          <dataContractSerializer maxItemsInObjectGraph="2147483647" />
          <SecurityEndpoint />
          <SessionEndpoint />
          <exceptionMarshalling />
        </behavior>
      </endpointBehaviors>
    </behaviors>
  </system.serviceModel>
  <system.web>
    <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 enabled="true" defaultProvider="ClientRoleProvider">
      <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.net>
    <mailSettings>
      <smtp from="no reply">
        <!-- <network host="x.x.x.x" port="25" userName="" password="" defaultCredentials="true" /> -->
        <network host="#{Xbap.Settings.Smtp.Host}" port="#{Xbap.Settings.Smtp.Port}" defaultCredentials="#{Xbap.Settings.Smtp.DefaultCredentials}" />
      </smtp>
    </mailSettings>
  </system.net>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.1" />
  </startup>
</configuration>