When we use Asp.net to develop a web form page, we usually submit data containing HTML content to the background.ProgramCodeDuring processing, the validaterequest = "false" attribute is set for the page. After the attribute is set, the annoying "Slave client... A potentially dangerous request is detected. the error "form value" disappears.
This error has changed in ASP. net mvc 2;
First, if you are using. net 3.5, you only need to add a feature for the action that receives the form value: [validateinput (false)]. You do not need to set the validaterequest = "false" attribute on the page.
As follows:
[Httppost]
[Validateinput ( False )]
Public Actionresult articlesave (blogarticle Model)
However, if you are using. Net 4.0, you will find that this operation is still invalid.
Sorry, because. Net 4.0 has changed, you need to add it under the <system. Web> node in your web. config:
<HttpruntimeRequestvalidationmode= "2.0"/>
Now you can pass.
Hope you can communicate and make progress together! China Software ~