Is there a simple way in .NET to quickly get the current protocol, host, and port? For example, if I\'m on the following URL:
http://www.mywebsite.com:80/pages
Request.Url will return you the Uri of the request. Once you have that, you can retrieve pretty much anything you want. To get the protocol, call the Scheme property.
Sample:
Uri url = Request.Url; string protocol = url.Scheme;
Hope this helps.