Web.config 3.59 KB
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <!--自行配置-->
    <section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter"/>
    <sectionGroup name="DCWeb">
      <section name="HttpCompress" type="DC.Web.HttpCompress.Configuration,DC.Web.HttpCompress"/>
    </sectionGroup>
  </configSections>
  <appSettings>
     <!--短信-->
    <add key="smsappid" value="wx04cede" />
    <add key="smsappsecret" value="bd071a3f27" />
    <add key="smshost" value="http://apiopen.myjxt.com/" />
    <add key="smsschema" value="JYDC" />
  </appSettings>
  <connectionStrings>
    <!--<add name="connCore" connectionString="Data Source=question.sqlserver.rds.aliyuncs.com,3725;;Initial Catalog=questions;Persist Security Info=True;User ID=question;Password=hzsz_111111" providerName="System.Data.SqlClient"/>-->
    <add name="connCore" connectionString="Data Source=60.190.202.49,3341;;Initial Catalog=wjs1;Persist Security Info=True;User ID=sa;Password=hzsz_111111" providerName="System.Data.SqlClient"/>
  </connectionStrings>
  <system.web>
    <httpRuntime appRequestQueueLimit="10000" />
    <compilation debug="true"/>
    <!--<authentication mode="Forms">
      <forms defaultUrl="~" loginUrl="~/WeixinOAuth.html" timeout="3600"/>
    </authentication>
    <authorization>
      <deny users="?"/>
    </authorization>-->
    <customErrors mode="Off" defaultRedirect="Error.html"/>
    <httpModules>
      <!--自行配置-->
      <add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter"/>
      <add type="DC.Web.HttpCompress.HttpModule,DC.Web.HttpCompress" name="HttpCompressModule"/>
    </httpModules>
  </system.web>
  <system.webServer>
    <modules>
      <add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter"/>
      <add type="DC.Web.HttpCompress.HttpModule,DC.Web.HttpCompress" name="HttpCompressModule"/>
    </modules>
    <validation validateIntegratedModeConfiguration="false"/>
  </system.webServer>
  <RewriterConfig>
    <Rules>
      <!--error-->
      <RewriterRule>
        <LookFor>~/(.+)\.aspx(.*)</LookFor>
        <SendTo>~/Common/Error.aspx?errmsg=1</SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/Error.html</LookFor>
        <SendTo>~/Common/Error.aspx</SendTo>
      </RewriterRule>
      <!--ajax-->
      <RewriterRule>
        <LookFor>~/Area/(.+)/(.+)?</LookFor>
        <SendTo>~/Common/Area.aspx?code=$1&amp;schooltype=$2</SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/Topic/(.+)/(.+)/(.+)?</LookFor>
        <SendTo>~/Common/Topic.aspx?type=$1&amp;current=$2&amp;num=$3</SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/School/(.+)/(.+)?</LookFor>
        <SendTo>~/Common/School.aspx?code=$1&amp;type=$2</SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/Ajax/(.+)?</LookFor>
        <SendTo>~/Common/Ajax.aspx?action=$1</SendTo>
      </RewriterRule>
      <!--default html-->
      <RewriterRule>
        <LookFor>~/?</LookFor>
        <SendTo>~/Default.aspx</SendTo>
      </RewriterRule>
      <RewriterRule>
        <LookFor>~/(.+)\.html(.*)</LookFor>
        <SendTo>~/$1.aspx$2</SendTo>
      </RewriterRule>
    </Rules>
  </RewriterConfig>
  <DCWeb>
    <HttpCompress compressionType="GZip">
      <PathSettings jsPath="assets" cssPath="assets"/>
      <IncludedMimeTypes>
        <add mime="text/html"/>
        <add mime="image/gif"/>
        <add mime="image/jpeg"/>
        <add mime="text/css"/>
        <add mime="application/x-javascript"/>
      </IncludedMimeTypes>
    </HttpCompress>
  </DCWeb>
</configuration>