title: QueryString malformed after URLDecode
body: <p>I'm trying to pass in a Base64 string into a C#.Net web application via the QueryString. When the string arrives the "+" (plus) sign is being replaced by a space. It appears that the automatic URLDecode process is doing this. I have no control over what is being passed via the QueryString. Is there any way to handle this server side?</p>
  
  <p>Example:</p>
  
  <pre><code>http://localhost:3399/Base64.aspx?VLTrap=VkxUcmFwIHNldCB0byAiRkRTQT8+PE0iIHBsdXMgb3IgbWludXMgNSBwZXJjZW50Lg==
  </code></pre>
  
  <p>Produces:</p>
  
  <pre><code>VkxUcmFwIHNldCB0byAiRkRTQT8 PE0iIHBsdXMgb3IgbWludXMgNSBwZXJjZW50Lg==
  </code></pre>
  
  <p>People have suggested URLEncoding the querystring:</p>
  
  <pre><code>System.Web.HttpUtility.UrlEncode(yourString) 
  </code></pre>
  
  <p>I can't do that as I have no control over the calling routine (which is working fine with other languages).</p>
  
  <p>There was also the suggestion of replacing spaces with a plus sign:</p>
  
  <pre><code>Request.QueryString["VLTrap"].Replace(" ", "+");
  </code></pre>
  
  <p>I had though of this but my concern with it, and I should have mentioned this to start, is that I don't know what <em>other</em> characters might be malformed in addition to the plus sign.</p>
  
  <p><strong><em>My main goal is to intercept the QueryString before it is run through the decoder.</em></strong></p>
  
  <p>To this end I tried looking at Request.QueryString.toString() but this contained the same malformed information. Is there any way to look at the raw QueryString <em>before</em> it is URLDecoded?</p>
  
  <p>After further testing it appears that .Net expects everything coming in from the QuerString to be URL encoded but the browser does not automatically URL encode GET requests.</p>