字符串加密
打开Vs的开发人员命令提示符

//加密web.config文件的连接字符串
aspnet_regiis.exe -pef "connectionStrings" "D:\HDAX\ASPNET\T169Aspnet\BookShop" -prov "DataProtectionConfigurationProvider"
//解密web.config文件的连接字符串
aspnet_regiis.exe -pdf "connectionStrings" "D:\HDAX\ASPNET\T169Aspnet\BookShop"
自定义错误链接
mode参数:on 永远都是自定义 off 不出现自定义 RemoteOnly自己看的是调试的 远程访问是自定义

<system.web>
<customErrors mode="Off" defaultRedirect="/error.html">
<error statusCode="404" redirect="noFile.html"/>
</customErrors>
<compilation debug="true" targetFramework="4.5.2" />
<httpRuntime targetFramework="4.5.2" />
</system.web>
Handler配置

<system.webServer>
<handlers><!--配置handler-->
<!--type属性需要明确命名空间-->
<add name="bookWater" verb="*" path="/images/BookCovers/*.jpg" type="BookShop.Handler.BookHandler"/>
</handlers>

发布网站 在我的电脑管理中查看Internet information services (iis)管理器 即可进行设置
如果不用公共域名 那么端口是指向本地的 即不能重复
如果有域名 那么端口默认为80

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2021-10-15
  • 2021-08-15
  • 2021-10-21
  • 2021-04-07
猜你喜欢
  • 2021-07-05
  • 2021-09-16
  • 2021-11-06
  • 2021-09-13
  • 2021-09-22
  • 2022-01-30
  • 2021-06-16
相关资源
相似解决方案