a potentially dangerous request.form with Freetextbox
I am using a control called FreeTextBox and when i am click on update button i am getting the error "A potentially dangerous Request.Form value was detected from the client (fTxtContent="tyretyeryteyterty...").". and for that i don't want to disable the page level开发者_开发百科 property i.e validaterequest to false. Is there any good idea to deal with this error.
Please Help me ASAP.
If anyone still needs help with this, setting ValidateRequest to false will work before .NET Framework 4.0. In 4.0, requests are validated by default. To disable this functionality, add the following to the element of your web.config:
<httpRuntime requestValidationMode="2.0" />
That should fix it. Thanks RobRisner
I am not a big fan of disabling ValidateRequest, but if I am not mistaken, FreeTextBox saves the raw text as HTML. So that text might be saved with <p>Your text here</p>
which ASP.NET would treat as potentially hazardous. You may have no choice but to turn off validate request on this page that has the component.
I think you need to set validaterequest to false, because FreeTextBox is trying to send HTML to server, why are you using FreeTextBox?
精彩评论