【问题标题】:urlrewrite in IIS vs replace http with https in global.asaxIIS 中的 urlrewrite 与 global.asax 中的 https 替换 http
【发布时间】:2020-10-23 08:48:09
【问题描述】:

从安全角度来看,使用 IIS UrlRewrite 实现 https 和通过在 global.asax dotnet 代码的应用程序启动事件中将 URL 中的 http 替换为 https 来实现 https 有什么区别。

【问题讨论】:

  • 您想了解是否有人可以以某种方式关闭您的 HTTP 到 HTTPS 重定向?请更具体。
  • 我想知道哪个更安全。 Bcoz 在重定向到 https 之前,请求是通过尚未加密的 http。同样,当在 http 管道中时,URL 在这两种情况下都会被加密。这样我就知道哪个更安全了。

标签: asp.net .net iis asp.net-mvc-5


【解决方案1】:

在 IIS 管道的开始请求事件中执行 URL 重写。将 http 重定向到 https 时,安全级别没有明显差异。

在 IIS 管理器中启用 SSL 时,不支持并排 http 和 https,因为 schannel 会破坏它。因此,您可能需要创建另一个站点来处理 http 绑定并实现 https 重定向。在这种情况下,他们两个都应该是安全的。

https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/iis-url-rewriting-and-aspnet-routing

【讨论】:

  • 感谢您的信息和链接。
猜你喜欢
  • 2019-04-19
  • 1970-01-01
  • 1970-01-01
  • 2015-03-29
  • 1970-01-01
  • 2013-08-16
  • 2011-07-14
  • 2018-12-15
  • 1970-01-01
相关资源
最近更新 更多