trim HttpHeaders
石头 编写于 2024-06-22 08:55:23
X
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <appSettings>
    <add key="webpages:Version" value="2.0.0.0"/>
    <add key="webpages:Enabled" value="false"/>
    <add key="PreserveLoginUrl" value="true"/>
    <add key="ClientValidationEnabled" value="true"/>
    <add key="UnobtrusiveJavaScriptEnabled" value="true"/>
  </appSettings>
  <connectionStrings>
    <!--<add name="Membership" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=~\App_Data\Membership.mdb" providerName="Access"/>-->
    <!--<add name="Membership" connectionString="Data Source=~\App_Data\Membership.db" providerName="Sqlite"/>-->
    <!--<add name="Membership" connectionString="Data Source=~\App_Data\Membership.sdf" providerName="SqlCe"/>-->
    <!--<add name="Membership" connectionString="Server=.;Integrated Security=SSPI;Database=Membership" providerName="System.Data.SqlClient" />-->
    <!--<add name="Membership" connectionString="Server=.;user id=sa;password=sa;Database=Membership" providerName="System.Data.SqlClient" />-->
    <!--<add name="Membership" connectionString="Server=.;Port=3306;Database=Membership;Uid=root;Pwd=root;" providerName="MySql.Data.MySqlClient"/>-->
  </connectionStrings>
  <system.web>
    <compilation debug="true" targetFramework="4.0"/>
    <authentication mode="Forms">
      <forms loginUrl="~/Admin/User/Login" timeout="2880"/>
    </authentication>
    <pages>
      <namespaces>
        <add namespace="System.Web.Mvc"/>
        <add namespace="System.Web.Mvc.Ajax"/>
        <add namespace="System.Web.Mvc.Html"/>
        <add namespace="System.Web.Routing"/>
        <add namespace="System.Web.WebPages"/>
      </namespaces>
    </pages>
    <httpRuntime requestValidationMode="2.0"/>
    <httpModules>
      <!--全局错误处理模块-->
      <add name="ErrorModule" type="NewLife.Web.ErrorModule,NewLife.Core"/>
      <!--页面执行时间模块,用于在页面中输出页面执行时间和查询执行次数-->
      <add name="DbRunTimeModule" type="NewLife.Cube.DbRunTimeModule,NewLife.Cube"/>
    </httpModules>
  </system.web>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules runAllManagedModulesForAllRequests="true">
      <!--全局错误处理模块-->
      <add name="ErrorModule" type="NewLife.Web.ErrorModule,NewLife.Core"/>
      <!--页面执行时间模块,用于在页面中输出页面执行时间和查询执行次数-->
      <add name="DbRunTimeModule" type="NewLife.Cube.DbRunTimeModule,NewLife.Cube"/>
    </modules>
    <httpProtocol>
      <customHeaders>
        <remove name="X-Powered-By"/>
        <add name="X-Powered-By" value="NewLife.Cube http://www.NewLifeX.com"/>
      </customHeaders>
    </httpProtocol>
    <!--静态缓存使用浏览器缓存,超时时间之内不发出Http请求(F5除外)-->
    <staticContent>
      <remove fileExtension=".woff"/>
      <remove fileExtension=".woff2"/>
      <mimeMap fileExtension=".woff" mimeType="application/x-font-woff"/>
      <mimeMap fileExtension=".woff2" mimeType="application/x-font-woff"/>
      <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="240:00:00"/>
    </staticContent>
  </system.webServer>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/>
        <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
        <bindingRedirect oldVersion="4.0.0.0-4.0.0.1" newVersion="4.0.0.1"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>