<?xml version="1.0"?>

<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<!--MergeItemInfor Condition="/configuration/log4net/appender/add[@name='file']" ParentNode="/configuration/log4net/appender"  OpeType="AddOrUpdate" -->
<configuration>
  <configSections>
    <!--企业库配置源信息-->
    <section name="policyInjection" type="Microsoft.Practices.EnterpriseLibrary.PolicyInjection.Configuration.PolicyInjectionSettings, Microsoft.Practices.EnterpriseLibrary.PolicyInjection, Version=4.1.0.0, Culture=neutral, PublicKeyToken=null" />
    <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=4.1.0.0, Culture=neutral, PublicKeyToken=null" />
    <section name="cachingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings, Microsoft.Practices.EnterpriseLibrary.Caching, Version=4.1.0.0, Culture=neutral, PublicKeyToken=null" />
    <section name="enterpriseLibrary.ConfigurationSource" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection, Microsoft.Practices.EnterpriseLibrary.Common, Version=4.1.0.0, Culture=neutral, PublicKeyToken=null" />
    <!--企业库缓存配置区段处理程序-->
    <!--策略注入模块配置区段处理程序-->
    <!-- required to read the <dataCacheClient> element -->
    <section name="dataCacheClient" type="Microsoft.Data.Caching.DataCacheClientSection,CacheBaseLibrary" allowLocation="true" allowDefinition="Everywhere" />
    <section name="workflow" type="Kingdee.BOS.Workflow.Configuration.WorkflowConfigSection, Kingdee.BOS.Workflow" />
    <!--脚本配置-->
    <section name="scripting" type="Kingdee.BOS.Scripting.Configuration.BOScriptConfiguration, Kingdee.BOS"/>
    <!--日志组件配置-->
    <section name="log4net" type="System.Configuration.IgnoreSectionHandler"/>
    <!--
		<sectionGroup name="devExpress" type="System.Configuration.ConfigurationSectionGroup, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
			<section name="xpf.printing" type="DevExpress.Xpf.Printing.Service.ConfigSections.PrintingServiceSection, DevExpress.Xpf.Printing.v10.2.Service, Version=10.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
		</sectionGroup>
    -->
  </configSections>
  <scripting>
    <evaluators>
      <!-- 这是默认的解析器配置，请勿删除，如果需要添加写的解析器配置，可以参考其格式 -->
      <evaluator name="default"
         type="Kingdee.BOS.Scripting.PyExpressionEvaluator, Kingdee.BOS"
         cacheCapacity="100" minCacheMinutes="1" maxCacheMinutes="60"
          />
    </evaluators>
  </scripting>

  <policyInjection>
    <policies>
      <add name="KCache">
        <matchingRules>
          <add match="Kingdee.BOS.App.Core" type="Microsoft.Practices.EnterpriseLibrary.PolicyInjection.MatchingRules.AssemblyMatchingRule, Microsoft.Practices.EnterpriseLibrary.PolicyInjection, Version=4.1.0.0, Culture=neutral, PublicKeyToken=null" name="Assembly Matching Rule" />
        </matchingRules>
        <handlers>
          <add cachePolicyName="Entity Policy" order="0" type="Kingdee.BOS.Cache.KCacheMethodCallHandler, Kingdee.BOS" name="Cache Handler" />
          <add perfeventtype="Kingdee.BOS.Performance.Publisher.RpcPerfEvent" order="2" type="Kingdee.BOS.Performance.Publisher.PerformanceCallHandler,Kingdee.BOS.Performance" name="perfevent" />
          <add perfeventtype="Kingdee.BOS.Performance.Publisher.WebUIPerfEvent" order="3" type="Kingdee.BOS.Performance.Publisher.PerformanceCallHandler,Kingdee.BOS.Performance" name="webuiperfevent" />
          <add perfeventtype="Kingdee.BOS.Performance.Publisher.RpcSqlTransaction" order="1" type="Kingdee.BOS.Performance.Publisher.PerformanceCallHandler,Kingdee.BOS.Performance" name="sqltrans" />
        </handlers>
      </add>
      <add name="SqlPolicy">
        <matchingRules>
          <!--
          <add match="Execute*" ignoreCase="false" type="Microsoft.Practices.EnterpriseLibrary.PolicyInjection.MatchingRules.MethodSignatureMatchingRule, Microsoft.Practices.EnterpriseLibrary.PolicyInjection, Version=4.1.0.0, Culture=neutral, PublicKeyToken=null"
             name="Method Signature Matching Rule" />
          -->
          <add match="Kingdee.BOS.App" type="Microsoft.Practices.EnterpriseLibrary.PolicyInjection.MatchingRules.AssemblyMatchingRule, Microsoft.Practices.EnterpriseLibrary.PolicyInjection, Version=4.1.0.0, Culture=neutral, PublicKeyToken=null" name="Assembly Matching Rule" />
          <add type="Microsoft.Practices.EnterpriseLibrary.PolicyInjection.MatchingRules.MemberNameMatchingRule, Microsoft.Practices.EnterpriseLibrary.PolicyInjection, Version=4.1.0.0, Culture=neutral, PublicKeyToken=null" name="Member Name Matching Rule">
            <matches>
              <add match="BulkInserts" ignoreCase="false" />
              <add match="Execute*" ignoreCase="false" />
            </matches>
          </add>
        </matchingRules>
        <handlers>
          <add perfeventtype="Kingdee.BOS.Performance.Publisher.RpcSqlEvent" order="2" type="Kingdee.BOS.Performance.Publisher.PerformanceCallHandler,Kingdee.BOS.Performance" name="rpcsqkperfevent" />
        </handlers>
      </add>
    </policies>
  </policyInjection>
  <cachingConfiguration defaultCacheManager="Default Cache Manager">
    <cacheManagers>
      <add expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="1000000" numberToRemoveWhenScavenging="10" backingStoreName="Null Storage" type="Microsoft.Practices.EnterpriseLibrary.Caching.CacheManager, Microsoft.Practices.EnterpriseLibrary.Caching, Version=4.1.0.0, Culture=neutral, PublicKeyToken=null" name="Default Cache Manager" />
    </cacheManagers>
    <backingStores>
      <add encryptionProviderName="" type="Microsoft.Practices.EnterpriseLibrary.Caching.BackingStoreImplementations.NullBackingStore, Microsoft.Practices.EnterpriseLibrary.Caching, Version=4.1.0.0, Culture=neutral, PublicKeyToken=null" name="Null Storage" />
    </backingStores>
  </cachingConfiguration>
  <enterpriseLibrary.ConfigurationSource selectedSource="System Configuration Source">
    <sources>
      <!--  <add name="Sql Configuration Source" type="Microsoft.Practices.EnterpriseLibrary.SqlConfigurationSource.SqlConfigurationSource, Microsoft.Practices.EnterpriseLibrary.SqlConfigurationSource, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"
        connectionString="Data Source=192.168.18.112;Initial Catalog=acctctl;User ID=sa;Password=sa"
        getStoredProcedure="EntLib_GetConfig" setStoredProcedure="EntLib_SetConfig"
        refreshStoredProcedure="UpdateSectionDate" removeStoredProcedure="EntLib_RemoveSection" /> -->
      <add name="System Configuration Source" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.SystemConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=4.1.0.0, Culture=neutral, PublicKeyToken=null" />
    </sources>
  </enterpriseLibrary.ConfigurationSource>
  <appSettings>
    <!--性能发布参数配置-->
    <!--应用部署路径-->
    <add key="AppDeploymentPath" value="" />
    <!--性能订阅开关-->
    <add key="PerfSuberscriberServerIsValid" value="false" />
    <!--最大性能事务缓存数-->
    <add key="PerfTransMaxLength" value="50" />
    <!--每个性能事务包含的最大性能事件数-->
    <add key="PerfEventMaxLength" value="50" />
    <!--当性能事务最大时，过期时间-->
    <add key="PerfTransTimeOut" value="00:00:05" />
    <add key="PerfPubServers" value="localhost" />
    <add key="PerfPubWebServers" value="localhost" />
    <!--事件中的stackTrace默认不输出，只在分析具体问题时动态打开-->
    <add key="PerfEventOutputStackTrace" value="false" />
    <!--是否启动工作流服务-->
    <add key="EnableWorkflow" value="true" />
    <!--网站超时设置(秒),默认3600秒-->
    <add key="AppTimeOut" value="3600"/>
    <!--网站超时设置(秒)-心跳间隔,默认300秒-->
    <add key="AppHearbeat" value="300"/>
    <!--网站超时设置启用-->
    <add key="AppTimeOutEnable" value="True"/>
  </appSettings>
  <!-- Enterprise Lib -->
  <!-- Velocity simple client -->
  <dataCacheClient deployment="routing">
    <!-- (optional) specify local cache-->
    <!--<localCache isEnabled="true" sync="TTLBased" objectCount="1000000" ttlValue="30"/>-->
    <!-- note: cache notifications are not supported with simple client -->
    <!-- cache host(s) -->
    <hosts>
      <host name="192.168.18.112" cachePort="22233" cacheHostName="DistributedCacheService" />
    </hosts>
  </dataCacheClient>
  <log4net>
    <!-- Define some output appenders -->
    <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
      <file value="App_Data\Log\"/>
      <appendToFile value="true"/>
      <maxSizeRollBackups value="10"/>
      <maximumFileSize value="1MB"/>
      <rollingStyle value="Date"/>
      <datePattern value="yyyy-MM-dd/'Cloud.log'" />
      <staticLogFileName value="false"/>
      <param name="RollingStyle" value="Composite" />
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%date [%thread] %-5level - %message%newline"/>
      </layout>
    </appender>
    <root>
      <!--ALL,DEBUG,INFO,ERROR,OFF -->
      <level value="ALL"/>
      <appender-ref ref="RollingLogFileAppender"/>
    </root>
  </log4net>
  <system.webServer>
    <handlers>
      <add name="ServiceStack" path="*" verb="*" type="ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory, ServiceStack" resourceType="Unspecified" preCondition="integratedMode,runtimeVersionv4.0" />
    </handlers>
    </system.webServer>
  <!--<system.web>
        <compilation debug="true" targetFramework="4.0" />      
        <httpHandlers>
          <add path="*" type="ServiceStack.WebHost.Endpoints.ServiceStackHttpHandlerFactory, ServiceStack" verb="*"/>
        </httpHandlers>
    </system.web>-->
  <workflow>
    <environment Source="workflow" LogLevel="Error" />
    <services>
      <!--<service name="ExpressionEvaluator" impl="Kingdee.BOS.Workflow.Contracts.PyEvaluator, Kingdee.BOS.Workflow" />-->
      <service name="BillService" impl="Kingdee.BOS.Workflow.App.Core.Repositories.BillRepository, Kingdee.BOS.Workflow.App.Core" />
      <service name="Participant" impl="Kingdee.BOS.Workflow.App.Core.ParticipantService, Kingdee.BOS.Workflow.App.Core" />
      <service name="LogService" impl="Kingdee.BOS.Workflow.App.Core.Log.WorkflowLogService, Kingdee.BOS.Workflow.App.Core" />
      <service name="WorkflowDataService" impl="Kingdee.BOS.Workflow.App.Core.WorkflowDataService, Kingdee.BOS.Workflow.App.Core" />
      <service name="WorkflowTestDataService" impl="Kingdee.BOS.Workflow.App.Core.WFTest.WorkflowTestDataService, Kingdee.BOS.Workflow.App.Core" />
    </services>
    <assemblies>
      <assembly name="Kingdee.BOS.Workflow" />
      <assembly name="Kingdee.BOS.Workflow.Models" />
      <assembly name="Kingdee.BOS.Workflow.Extends" />
      <assembly name="Kingdee.BOS.ApprovalFlow"/>
    </assemblies>
  </workflow>
  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name="">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
</configuration>
