Request.Url.Port giving wrong port
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?
What am I missing here?
Update: If I do request.Headers["Host"].ToString()
I get full host with port i.e 201.121.152.168:68
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 will give you the correct port as far as I know because it is sent from the browser (which is seeing the url with port 68).
精彩评论