v9.7.2018.0421   支持运行时修改DAL连接字符串
大石头 authored at 2018-04-21 14:00:47
3.17 KiB
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="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" />
  </appSettings>
  <connectionStrings>
    <!--<add name="Membership" connectionString="Data Source=~\App_Data\Membership.db" providerName="Sqlite"/>-->
    <!--<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=10.10.4.192;Port=3306;Database=Membership;Uid=root;Pwd=Pass@word;Migration=On" providerName="MySql.Data.MySqlClient"/>-->
    <!--<add name="Membership" connectionString="Data Source=tcp://10.10.20.104/ORCL;User Id=scott;Password=tiger;" providerName="System.Data.OracleClient"/>-->
  </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 executionTimeout="15" />
  </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" />
      <remove fileExtension=".ttf" />
      <mimeMap fileExtension=".ttf" mimeType="application/x-font-truetype" />
      <remove fileExtension=".svg" />
      <mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
      <remove fileExtension=".otf" />
      <mimeMap fileExtension=".otf" mimeType="application/x-font-opentype" />
      <remove fileExtension=".eot" />
      <mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" />
      <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="240:00:00" />
    </staticContent>
  </system.webServer>
</configuration>