Hello, I transfer a variable from a hidden field with js to asp.net. The variable contains html code, and I get an error
A potentially dangerous Request.Form value received from the client (div_value = "Logo ...") has been detected.
Description: The request validation procedure has detected a potentially dangerous client input value; Request processing aborted. This value may indicate an attempt to violate the security of the application, for example, through attacks "cross-site scripting". To allow pages to redefine application request verification options, in the httpRuntime configuration section, set the requestValidationMode attribute to requestValidationMode = "2.0". Example:. After setting this value, you can disable request validation by setting the value validateRequest = "false" in the Page directive or the configuration section. However, in this case, it is strongly recommended to explicitly check in the application all entered data. For more information, see http://go.microsoft.com/fwlink/?LinkId=153133 . Exception Details: System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value received from the client (div_value = "Logo ...") has been detected.
Tell me how the web.confg should look right, that there was no error. So my looks
<?xml version="1.0"?> <!-- For more information on how to configure your ASP.NET application, please visit [url]http://go.microsoft.com/fwlink/?LinkId=169433[/url] --> <configuration> <system.web> <compilation debug="true"/> <httpRuntime requestValidationMode="2.0" /> </system.web> </configuration>