title: Why I am getting this error with Request.Url.PathAndQuery?
body: <p>As I have been requested by my instructor to use AntiXss library in the development of my senior project, I am facing a lot of difficulties of using this library because of the lack of resources on the web. A part of my project I have an upload file function where the user will be able to upload files, and after uploading his files, he will be redirected to the same page to see some other information. Everything works fine, but when I added AntiXss library and use it with the following line only, I got this error </p>
  
  <p><strong>(HTTP 400 Error - Bad Request)</strong> </p>
  
  <p>and I don't know why. <strong>Could anyone tell me why I am getting this error? And how to fix it?</strong></p>
  
  <p><strong>C# Code:</strong></p>
  
  <pre><code>Response.Redirect(Encoder.HtmlFormUrlEncode(Request.Url.PathAndQuery));
  </code></pre>