title: Invalid Uri : The uri scheme is not valid
body: <p>I am trying to login to a website via WebRequest. I get an exception at this point : </p>
  
  <pre><code>WebRequest req = WebRequest.Create(formUrl.Trim());
  </code></pre>
  
  <p><code>string url,string username,string password</code> come from a text box. This is the full code: </p>
  
  <pre><code>public void LoginToUrl(string url,string username, string password )
  {
      formUrl = url;
      formParams = string.Format("username={0}&amp;password={1}", username,password);                  
  
      WebRequest req = WebRequest.Create(formUrl.Trim());//
      req.ContentType = "application/x-www-form-urlencoded";
      req.Method = "POST";
        bytes = Encoding.ASCII.GetBytes(formParams);
      req.ContentLength = bytes.Length;
      using (Stream os = req.GetRequestStream())
      {
          os.Write(bytes, 0, bytes.Length);
      }
      WebResponse resp = req.GetResponse();
      cookieHeader = resp.Headers["Set-cookie"];
  }
  </code></pre>
  
  <p>This is the POST Data:</p>
  
  <pre><code>Host=internetlogin1.cu.edu.ng
  
  User-Agent=Mozilla/5.0 (Windows NT 10.0; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0
  
  Accept=text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  
  Accept-Language=en-US,en;q=0.5
  
  Accept-Encoding=gzip, deflate
  </code></pre>
  
  <p>Refer this <a href="https://internetlogin1.cu.edu.ng/login" rel="noreferrer">link</a></p>
  
  <pre><code>Connection=keep-alive
  
  Content-Type=application/x-www-form-urlencoded
  
  Content-Length=49
  POSTDATA=dst=&amp;popup=true&amp;username=13ck015373&amp;password=F3NB
  </code></pre>