<?xml version="1.0" encoding="UTF-8"?>
<!-- 
    注意: 除了手动编辑此文件以外，您还可以使用 
    Web 管理工具来配置应用程序的设置。可以使用 Visual Studio 中的
     “网站”->“Asp.Net 配置”选项。
    设置和注释的完整列表在 
    machine.config.comments 中，该文件通常位于 
    \Windows\Microsoft.Net\Framework\v2.x\Config 中
-->
<configuration>
	<configSections>
		<!--url rewriter -->
		<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
		<!--url rewriter -->
	</configSections>
  <appSettings>
    <add key="ServerIP" value="127.0.0.1" />
    <add key="debug" value="trde" />
    <add key="FCKeditor:BasePath" value="/hailieditor/" />
    <add key="FCKeditor:UserFilesPath" value="/upload/" />
  </appSettings>
  <connectionStrings>
    <add name="DBPath" connectionString="~/App_Data/cai_Enterprise.mdb" />
    <!--数据库路径，前面的~必须保留-->
  </connectionStrings>
	<system.web>
		<!-- 
            设置 compilation debug="true" 可将调试符号插入
            已编译的页面中。但由于这会 
            影响性能，因此只在开发过程中将此值 
            设置为 true。
        -->
    <httpRuntime requestValidationMode="2.0" executionTimeout="90" maxRequestLength="40960000" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100" />
    <customErrors mode="Off" />
    
		<compilation debug="true" targetFramework="4.0">
			<assemblies>
				<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /></assemblies>
      <buildProviders>
        <add extension=".html" type="System.Web.Compilation.PageBuildProvider" />
      </buildProviders>
    </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>
        -->
		<httpHandlers>
			<!-- url rewriter -->
			<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
			<add verb="*" path="*.html" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
			<!-- url rewriter -->
		</httpHandlers>
		<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" /></system.web>
	<!--******************************************************************************** -->
  <RewriterConfig>
    <Rules>
      <RewriterRule>
        <LookFor>~/index.html</LookFor>
        <SendTo>~/default.aspx</SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/about_(.*).html</LookFor>
        <SendTo><![CDATA[~/about.aspx?id=$1]]></SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/product_center.html</LookFor>
        <SendTo>~/product_center.aspx</SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/product_(.*)_(.*)_(.*)_(.*).html</LookFor>
        <SendTo><![CDATA[~/product.aspx?action=$1&MajorID=$2&SubID=$3&page=$4]]></SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/psearch_(.*)_(.*).html</LookFor>
        <SendTo><![CDATA[~/psearch.aspx?keywords=$1&page=$2]]></SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/product_detail-(.*).html</LookFor>
        <SendTo><![CDATA[~/product_detail.aspx?ProductID=$1]]></SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/solution.html</LookFor>
        <SendTo>~/solution.aspx</SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/serviceyl_(.*).html</LookFor>
        <SendTo><![CDATA[~/serviceyl.aspx?id=$1]]></SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/jiameng_(.*).html</LookFor>
        <SendTo><![CDATA[~/jiameng.aspx?id=$1]]></SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/news_(.*)_(.*).html</LookFor>
        <SendTo><![CDATA[~/news.aspx?classid=$1&page=$2]]></SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/newfw_(.*)_(.*).html</LookFor>
        <SendTo><![CDATA[~/newfw.aspx?classid=$1&page=$2]]></SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/news_detail-(.*).html</LookFor>
        <SendTo><![CDATA[~/news_detail.aspx?NewsID=$1]]></SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/anli_(.*).html</LookFor>
        <SendTo><![CDATA[~/anli.aspx?page=$1]]></SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/anli-view-(.*).html</LookFor>
        <SendTo><![CDATA[~/anli_view.aspx?ProjectID=$1]]></SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/factorypic_(.*).html</LookFor>
        <SendTo><![CDATA[~/factorypic.aspx?page=$1]]></SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/facpic_detail-(.*).html</LookFor>
        <SendTo><![CDATA[~/facpic_view.aspx?FacPicID=$1]]></SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/customers_(.*).html</LookFor>
        <SendTo><![CDATA[~/customers.aspx?page=$1]]></SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/honorpic_detail-(.*).html</LookFor>
        <SendTo><![CDATA[~/honorpic_view.aspx?FacPicID=$1]]></SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/cert_(.*).html</LookFor>
        <SendTo><![CDATA[~/cert.aspx?page=$1]]></SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/certpic_detail-(.*).html</LookFor>
        <SendTo><![CDATA[~/certpic_view.aspx?FacPicID=$1]]></SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/customers.html</LookFor>
        <SendTo>~/customers.aspx</SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/kehu_detail-(.*).html</LookFor>
        <SendTo><![CDATA[~/kehu_view.aspx?FacPicID=$1]]></SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/partner_(.*).html</LookFor>
        <SendTo><![CDATA[~/partner.aspx?page=$1]]></SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/cooperativep-(.*).html</LookFor>
        <SendTo><![CDATA[~/cooperativep.aspx?FacPicID=$1]]></SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/job.html</LookFor>
        <SendTo>~/job.aspx</SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/guestbook.html</LookFor>
        <SendTo>~/guestbook.aspx</SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/contact.html</LookFor>
        <SendTo>~/contact.aspx</SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/m/aboutus.html</LookFor>
        <SendTo>~/m/aboutus.aspx</SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/m/product_(.*)_(.*)_(.*)_(.*).html</LookFor>
        <SendTo><![CDATA[~/m/product.aspx?action=$1&MajorID=$2&SubID=$3&page=$4]]></SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/m/pdetail-(.*).html</LookFor>
        <SendTo><![CDATA[~/m/pdetail.aspx?ProductID=$1]]></SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/m/news_(.*).html</LookFor>
        <SendTo><![CDATA[~/m/news.aspx?page=$1]]></SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/m/ndetail-(.*).html</LookFor>
        <SendTo><![CDATA[~/m/ndetail.aspx?NewsID=$1]]></SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/m/contact.html</LookFor>
        <SendTo>~/m/contact.aspx</SendTo>
      </RewriterRule>
    </Rules>
  </RewriterConfig>
	<!--******************************************************************************** -->
	<!-- 
        在 Internet 信息服务 7.0 下运行 ASP.NET AJAX 需要 system.webServer
        节。对早期版本的 IIS 来说则不需要此节。
    -->
	<system.webServer>
		<validation validateIntegratedModeConfiguration="false" />
        <handlers>
            <add name="b2b_tg" path="*" verb="*" type="System.Web.UI.PageHandlerFactory" resourceType="Unspecified" preCondition="integratedMode" />
            <add name="b2b_html" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
            <add name="b2b伪静态" path=".html" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
        </handlers>
        <modules>
            <add name="b2b_test2" type="RLRewriter.ModuleRewriter" preCondition="managedHandler" />
        </modules>
        <httpErrors>
            <remove statusCode="404" subStatusCode="-1" />
            <error statusCode="404" prefixLanguageFilePath="" path="/404.htm" responseMode="ExecuteURL" />
        </httpErrors>

	</system.webServer>
</configuration>
