A potentially dangerous Request.Form value was detected from the client

前端 未结 30 2148
刺人心
刺人心 2020-11-21 05:24

Every time a user posts something containing < or > in a page in my web application, I get this exception thrown.

I don\'t want to go

30条回答
  •  情书的邮戳
    2020-11-21 05:56

    It seems no one has mentioned the below yet, but it fixes the issue for me. And before anyone says yeah it's Visual Basic... yuck.

    <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Example.aspx.vb" Inherits="Example.Example" **ValidateRequest="false"** %>
    

    I don't know if there are any downsides, but for me this worked amazing.

提交回复
热议问题