Sending XML data via HTTP POST to IHttpHandler causes HttpRequestValidationException

徘徊边缘 提交于 2019-12-01 23:35:08
Matías Fidemraizer

As far as I know, you just need to encode that XML with entities.

I mean that < should be & lt; or > & gt;, and so on.

EDIT: I found that this is a duplicate of: How can Request Validation be disabled for HttpHandlers?

Try this!! :)

Just modify the web.config like this:

   <location path="Handlers/MyHandler.ashx">
      <system.web>
         <httpRuntime requestValidationMode="2.0" />
      </system.web>
   </location>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!