title: Url for HttpWebRequest truncated by special characters
body: <p>The URL of a Web Service that I need to call includes a parameter that includes free form text.  I'm not sure why it was designed that way since it is sent using POST and includes many fields as part of the POST.  But, it is causing me a problem.</p>
  
  <p>For some characters like the pound sign and &lt; >, the URL is truncated when it hits the problem character.  I'm HTML encoding the text for the parameter, but the problem remains.
  I can see special characters like > are being encoded to something like gt;.  I'm thinking that the semicolon in the encoded string is somehow a problem.</p>
  
  <p>I put a sniffer receiving the incoming request at the server and I see there that the URL has been truncated.</p>
  
  <p>At the server I see something like:</p>
  
  <pre><code>    ...?extraData=kjfkfjslkj
  </code></pre>
  
  <p>instead of:</p>
  
  <pre><code>    ...?extraData=kjfkfjslkj#kfjkdlsfj
  </code></pre>
  
  <p>The code is something like this:</p>
  
  <pre><code>    using System.Web;
      ....
      String strExtra="kjfkfjslkj#kfjkdlsfj";
      strURL = strStuff + "?extraData=" + System.Web.HttpUtility.HtmlEncode(strExtra);
      HttpWebRequest oRequest = (HttpWebRequest)WebRequest.Create(new Uri(strURL));
      oRequest.Method = httpMethod;
      oRequest.ContentType = "application/atom+xml";
      ...
      using (WebResponse oResponse = oRequest.GetResponse())
      {
      ...
      }
  </code></pre>