title: Invalid URI: The URI scheme is not valid in aspx
body: <p>When i hardcode the url in the code it works. I am trying to get the hostname and append the request. It gives this error,</p>
  
  <p><strong>Invalid</strong> <strong>URI</strong>: The URI scheme is not valid.</p>
  
  <p><strong>Description</strong>: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. </p>
  
  <pre><code>Exception Details: System.UriFormatException: Invalid URI: The URI scheme is not valid.
  Source Error: 
  Line 44:         string request = url.Scheme + "//" + url.Host + ":" + url.Port +"/accounts1/asp2netbridge.asp?sessVar=";
  Line 45:       
  Line 46:         HttpWebRequest _myRequest = (HttpWebRequest)WebRequest.Create(new Uri(request + sessionValue));
  Line 47:         _myRequest.ContentType = "text/html";
  Line 48:         _myRequest.Credentials = CredentialCache.DefaultCredentials;
  </code></pre>
  
  <p>Here is the code:</p>
  
  <pre><code>  Uri url = HttpContext.Current.Request.Url;
    string request = url.Scheme + "//" + url.Host + ":" + url.Port +"/accounts1/asp2netbridge.asp?sessVar=";      
    HttpWebRequest _myRequest = (HttpWebRequest)WebRequest.Create(new Uri(request + sessionValue));
  </code></pre>