开发者

validaterequest problem with asp.net web page

开发者 https://www.devze.com 2023-01-19 13:05 出处:网络
I have a form that a user fills out and can input html or other text into a textarea.I have the validaterequest attribute set to false on the page.However, when I submit the form with any html charact

I have a form that a user fills out and can input html or other text into a textarea. I have the validaterequest attribute set to false on the page. However, when I submit the form with any html characters it bombs saying that it detected the potentially dangerous request field and to make validaterequest=false. I've already done this so I'm not sure why it's not working. I've done this many times before and never had this problem. Anyone run into this before and if so, is there a f开发者_运维百科ix? I don't want to update my web.config and apply it site wide. Thanks.


As explained in the breaking changes if you are using ASP.NET 4.0 make sure you add the following to your web.config:

<httpRuntime requestValidationMode="2.0" />
0

精彩评论

暂无评论...
验证码 换一张
取 消