Posted on: 1/3/2015 6:39:47 PM | Views : 825

Hi,
I am using HttpContext.Current.Request.Url.Port in my codebehind to retrieve the port number for the purpose of constructing the application's base URL on the remote server.
My URL (as seen on the browser from outside the network) is http://mysubdomain.mydomain.com:8080/Page.aspx.
However, HttpContext.Current.Request.Url.Port returns 80 instead of 8080. Why?
When I run it in my localhost, where URL is http://localhost:50250/Page.aspx, HttpContext.Current.Request.Url.Port returns 50250 (as expected).
Would be really grateful for some guidance on this. Thank you.

Go to the complete details ...