Get original url without non-standard port (C#)
问题 First question! Environment MVC, C#, AppHarbor. Problem I am calling an openid provider, and generating an absolute callback url based on the domain. On my local machine, this works fine if I hit http://localhost:12345/login Request.Url; //gives me `http://localhost:12345/callback` However, on AppHarbor where I'm deploying, because they are using non-standard ports, even if I'm hitting it at "http://sub.example.com/login" Request.Url; //gives me http://sub.example.com:15232/callback And this