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
A more structured way to get this is to use UriBuilder. This avoids direct string manipulation.
var builder = new UriBuilder(Request.Url.Scheme, Request.Url.Host, Request.Url.Port);