title: sanitizing xss in asp.net mvc
body: <p>What is the best way to sanitize the user input in asp.net mvc without throwing "potentially dangerous request.form" exception and still preventing the xss attack for the post requests which contains <strong>dangerous</strong> tags.</p>
  
  <p><strong>Edit:</strong>
  I tried the AntiXss and created custom encoder which encodes all the submitted values at runtime but the problem is that it is still throwing the exception. Actually I am not figuring out that exactly where (which event) I can ensure that the request contains nothing dangerous and if it contains something dangerous, I can redirect it to another Action rather than throwing exception.</p>