<?xml version="1.0"?>
<!-- 
    注意: 除了手动编辑此文件以外，您还可以使用 
    Web 管理工具来配置应用程序的设置。可以使用 Visual Studio 中的
     “网站”->“Asp.Net 配置”选项。
    设置和注释的完整列表在 
    machine.config.comments 中，该文件通常位于 
    \Windows\Microsoft.Net\Framework\v2.x\Config 中
-->
<configuration>
	<configSections>
		<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
			<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
				<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
				<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
					<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
					<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
					<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
					<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
				</sectionGroup>
			</sectionGroup>
		</sectionGroup>
		
		<sectionGroup name="Winson.Framework">
			<section name="DBProvider" requirePermission="false" type="Winson.Framework.DBProviders.DataBaseProviderConfigurationSection, Winson.Framework" allowDefinition="MachineToApplication" restartOnExternalChanges="true"/>
			<section name="LogProvider" requirePermission="false" type="Winson.Framework.LogProviders.LogProviderConfigurationSection, Winson.Framework" allowDefinition="MachineToApplication" restartOnExternalChanges="true"/>
		</sectionGroup>

    <!--HttpCompress配置开始-->
    <sectionGroup name="DCWeb">
      <section name="HttpCompress" type="Winson.Framework.Utility.HttpCompress.Configuration, Winson.Framework"/>
    </sectionGroup>
	</configSections>

  <!--HttpCompress配置开始-->
  <DCWeb>
    <HttpCompress compressionType="GZip">
      <CacheSettings cacheFiles="false" path="cache"/>
      <PathSettings jsPath="js" cssPath="css"/>
      <IncludedMimeTypes>
        <add mime="text/html"/>
      </IncludedMimeTypes>    
      <!--<ExcludedPaths>
        <add path="~/PagerDemo.aspx" />
      </ExcludedPaths>-->
    </HttpCompress>
  </DCWeb>
  <!--HttpCompress配置结束-->
	
	<Winson.Framework>
		<DBProvider defaultProvider="MSSQLDateBaseProvider">
			<providers>
				<!--MSSQL和ACCESS的Provider-->
				<add name="MSSQLDateBaseProvider" type="Winson.Framework.DBProviders.DBProvider, Winson.Framework" connectionStringName="SqlProvider"/>
				<!--MYSQL的Provider-->
				<add name="MySqlDateBaseProvider" type="Winson.Framework.DBProviders.MySqlDBProvider, Winson.Framework" connectionStringName="MySqlProvider"/>
        <!--Oracle的Provider-->
        <add name="OracleDateBaseProvider" type="Winson.Framework.DBProviders.OracleDBProvider, Winson.Framework" connectionStringName="OracleProvider"/>
        <!--Xml的Provider-->
				<!--<add name="XmlDBProvider" type="Winson.Framework.DBProviders.XmlDBProvider, Winson.Framework" connectionStringName="XmlProvider"/>-->
				<!--如要使用不同数据库，只需更改connectionStringName属性即可，对应以下connectionStrings节进行修改-->
			</providers>
		</DBProvider>
		
		<LogProvider defaultProvider="Log2XMLProvider" useErrLog="True" useEventLog="True" eventTable="EventLog">
			<!--参数说明:
			defaultProvider:使用哪种方式记录日志文件，与以下providers配置节的name相匹配
			useErrLog: 是否启用错误日志
			useEventLog: 是否启用事务日志，即操作日志，此日志直接写入数据库，需另行写代码实现
			eventTable：事务日志表名，useEventLog为True时才有效
			-->
			<providers>
				<add name="Log2XMLProvider" type="Winson.Framework.LogProviders.Log2XMLProvider, Winson.Framework" logPath="Log\"/>
				<add name="Log2WinProvider" type="Winson.Framework.LogProviders.Log2WinProvider, Winson.Framework" eventSource="Winson.Framework"/>
			</providers>
		</LogProvider>
		
	</Winson.Framework>

  <appSettings>
    <!--设置网站缓存时间,单位秒-->
    <add key="WF.CacheDuration" value="60"/>
      <!--是否使用URL重写-->
      <add key="WF.IsRewriter" value="False"/>
	  <!--URL重写规则-->
	  <add key="WF.Rules" value="~/AppConfig/Regexs.xml"/>
	  <!--IP禁止列表-->
	  <add key="WF.BlockIP" value="~/AppConfig/IPFilter.xml"/>
  </appSettings>
	
	<connectionStrings>
		<add name="SqlProvider" connectionString="server=.;uid=sa;pwd=sa;database=WinsonFrameDB;" providerName="System.Data.SqlClient"/>
    <add name="OracleProvider" connectionString="Data Source=.;User ID=root;Password=master" providerName="System.Data.OracleClient"/>
		<add name="OLEDBProvider" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source='App_Data/WinsonFrameDB.mdb'" providerName="System.Data.OleDb" />
		<add name="MySqlProvider" connectionString="Server=locathost;Database=WinsonFrameworkDB;user id=winson;password=1234;use compression=true;" providerName="MySql.Data.MySqlClient"/>
		<add name="XmlProvider" connectionString="XMLDataBase"/>
	</connectionStrings>
	<system.web>
		<!-- 
            设置 compilation debug="true" 可将调试符号插入
            已编译的页面中。但由于这会 
            影响性能，因此只在开发过程中将此值 
            设置为 true。
        -->
		<compilation debug="true">
			<assemblies>
				<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
				<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
				<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
				<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
			</assemblies>
		</compilation>
		<!--
            通过 <authentication> 节可以配置 ASP.NET 用来 
            识别进入用户的
            安全身份验证模式。 
        -->
		<authentication mode="Windows"/>
		<!--
            如果在执行请求的过程中出现未处理的错误，
            则通过 <customErrors> 节可以配置相应的处理步骤。具体说来，
            开发人员通过该节可以配置
            要显示的 html 错误页
            以代替错误堆栈跟踪。

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
		<pages>
			<controls>
				<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
				<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			</controls>
		</pages>
		<httpHandlers>
      <!--HttpCompress配置开始-->
      <add verb="*" path="js.axd,css.axd" type="Winson.Framework.Utility.HttpCompress.CompressionHandler,Winson.Framework"/>
      <!--HttpCompress配置结束-->
      
			<remove verb="*" path="*.asmx"/>
			<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
		</httpHandlers>
		<httpModules>
      <!--HttpCompress配置开始-->
      <add name="HttpCompressModule" type="Winson.Framework.Utility.HttpCompress.HttpModule,Winson.Framework"/>
      <!--HttpCompress配置结束-->
			<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
		</httpModules>
	</system.web>
	<system.codedom>
		<compilers>
			<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
				<providerOption name="CompilerVersion" value="v3.5"/>
				<providerOption name="WarnAsError" value="false"/>
			</compiler>
			<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
				<providerOption name="CompilerVersion" value="v3.5"/>
				<providerOption name="OptionInfer" value="true"/>
				<providerOption name="WarnAsError" value="false"/>
			</compiler>
		</compilers>
	</system.codedom>
	<!-- 
        在 Internet 信息服务 7.0 下运行 ASP.NET AJAX 需要 system.webServer
        节。对早期版本的 IIS 来说则不需要此节。
    -->
	<system.webServer>
		<validation validateIntegratedModeConfiguration="false"/>
		<modules>
			<remove name="ScriptModule"/>
			<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
		</modules>
		<handlers>
			<remove name="WebServiceHandlerFactory-Integrated"/>
			<remove name="ScriptHandlerFactory"/>
			<remove name="ScriptHandlerFactoryAppServices"/>
			<remove name="ScriptResource"/>
			<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
		</handlers>
	</system.webServer>
	<runtime>
		<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
			<dependentAssembly>
				<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
				<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
			</dependentAssembly>
			<dependentAssembly>
				<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
				<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
			</dependentAssembly>
		</assemblyBinding>
	</runtime>
</configuration>
