Request.Url.Port给错埠 [英] Request.Url.Port giving wrong port

查看:130
本文介绍了Request.Url.Port给错埠的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从我的支持团队像 http://201.121.152.168:68/ 给予现场知识产权。现在,在正常情况下,你会认为68是端口。然而,当我做了Request.Host我得到 201.121.152.168 当我做Request.Port我得到 80 。那么,没有数量68去了?它无论是在主机之上,也不在港口到来。这就是为什么我的整个应用程序是打破。任何人都可以提出什么错误,我怎么能解决这个?

I am given a Live IP from my support team something like http://201.121.152.168:68/. Now in normal circumstances you would think 68 is the port. However when I do a Request.Host I get 201.121.152.168 and when I do Request.Port I get 80. So where did the number 68 go? It's neither coming in Host nor in port. That is why my whole application is breaking. Can anybody suggest what is going wrong and how can I correct this?

我是什么在这里失踪?

更新:如果我 request.Headers [主机]的ToString()我得到完整的主机与港口即201.121.152.168 :68

Update: If I do request.Headers["Host"].ToString() I get full host with port i.e 201.121.152.168:68

推荐答案

我会假设你的支持团队已经修复端口68上的防火墙,以指向80内部。因此,从看你的服务器的请求的点端口80来了这是,也许是这样吗?

I would assume that your support team has patched port 68 on your firewall to point to 80 internally. Therefore from the point of view of your server the request is coming it at port 80. Is that maybe the case?

UrlReferrer会据我所知,因为它是从浏览器发送(这是看到与港口68 URL)给你正确的端口。

这篇关于Request.Url.Port给错埠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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