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 dangerous tags.
Edit: 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.