即使启用了SSL,Request.URL也始终返回http

编程入门 行业动态 更新时间:2024-10-19 06:19:32
本文介绍了即使启用了SSL,Request.URL也始终返回http的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我准备了一个ASP.NET Web应用程序(ASP.NET V2.0),并在IIS(V7.5)中对其进行了配置。我在我的应用程序中使用了Request.Url.AbsoluteUri,它在我的服务器中运行良好。我在客户端的服务器计算机(2008 R2 Server)上部署了Web应用程序。但是在我的客户端环境中,即使启用了SSL,Request.Url.AbsoluteUri也始终返回http url。是否在客户端的服务器计算机上配置了任何IIS设置?请指导我

I have prepared an ASP.NET web application (ASP.NET V2.0) and I configured it in my IIS (V7.5). I used Request.Url.AbsoluteUri in my application and it works fine in my server. I deployed the web application on my client's server machine (2008 R2 Server). But in my client's environment Request.Url.AbsoluteUri always return http url even though they enabled SSL. Whether any IIS settings configured on my client's server machine? Please guide me

推荐答案

我之前见过这个。原因是生产站点的负载均衡器终止了SSL连接。它本身只使用HTTP连接到IIS。此方案是一种将SSL计算卸载到负载均衡器的方法。这意味着IIS应用程序永远不会看到HTTPS协议,尽管浏览器确实看到了它。

I have seen this before. The reason was that the load balancer at the production site terminated the SSL connection. It by itself connected to IIS using HTTP only. This scheme is a way to offload the SSL computations to the load balancer. It means that the IIS application does never see the HTTPS protocol although the browser does see it.

如评论中指出的消费者,请查看到达您的HTTP标头应用。负载均衡器可能会向它们添加信息,允许您重建所有内容。

As spender pointed out in the comments, please see the HTTP headers arriving at your application. The load balancer is likely to add information to them that allows you to reconstruct everything.

更多推荐

即使启用了SSL,Request.URL也始终返回http

本文发布于:2023-11-13 00:24:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1582899.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Request   SSL   http   URL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!