下载地址1:https://securityswitch.googlecode.com/files/SecuritySwitch%20v4.2.0.0%20-%20Binary.zip

下载地址2:http://url.cn/SOzKPC

1.将下载的"SecuritySwitch.dll"文件放在bin文件夹中,然后添加"SecuritySwitch"引用

2.打开web.config文件为您的web应用程序,或网站,添加如下的配置(注意···线条所包含的地方就是配置)

<configuration>
  <configSections>
    ......
    <!--配置securitySwitch-->
    <section name="securitySwitch" type="SecuritySwitch.Configuration.Settings, SecuritySwitch"/>
  </configSections>
  ......
  <!--配置securitySwitch-->
  <securitySwitch mode="RemoteOnly" baseInsecureUri="http://www.juqiandai.com" baseSecureUri="https://www.juqiandai.com" bypassSecurityWarning="true" ignoreAjaxRequests="false">
    <paths>
      <add path="~/secure/"/>
      <add path="~/reg/Logins.aspx" />
      <add path="~/Inc/CheckCode.aspx" />
    </paths>
  </securitySwitch>
  <system.web>
    <httpModules>
      ......
      <!--配置securitySwitch,for IIS <= 6.x, IIS 7.x + 经典模式, and Web Development Server (Cassini) -->
      <add name="SecuritySwitch" type="SecuritySwitch.SecuritySwitchModule, SecuritySwitch" />
    </httpModules>
  </system.web>
  <system.webServer>
    ......
    <!--配置securitySwitch-->
    <validation validateIntegratedModeConfiguration="false" />
    <modules>
      ......
      <!--配置securitySwitch,如果是 IIS 7.x + 集成模式 -->
      <add name="SecuritySwitch" type="SecuritySwitch.SecuritySwitchModule, SecuritySwitch" />
    </modules>
  </system.webServer>
</configuration>

3.将需要加密的页面或者路径添加到<paths></paths>中即可



版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章:

  • 2022-12-23
  • 2022-01-03
  • 2022-12-23
  • 2021-12-04
  • 2021-06-27
  • 2022-12-23
  • 1970-01-01
  • 2022-02-01
猜你喜欢
  • 2022-03-10
  • 2021-10-27
  • 2021-11-19
  • 2021-11-27
  • 2021-11-15
  • 2021-08-26
相关资源
相似解决方案