I am trying to turn off Request Validation for all action methods in a controller by doing this:
[ValidateInput(false)]
public class MyController : Controller
{
...
The reference I am using says this is possible and tells me to do it this way, but for some reason it's not working.
If I submit any html (even a simple <b> tag) through a text box, I get the error:
A potentially dangerous Request.Form value was detected from the client (text=<b>").
It's also not working by attaching the attribute to an individual method.
How can I disable Request Validation for a controller?
EDIT
I am working in VS2008 built in test server.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…