即使启用了SSL,Request.URL也始终返回http [英] Request.URL always returns http even though SSL is enabled

查看:155
本文介绍了即使启用了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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆