从客户端中检测到有潜在危险的 Request.Form 值-解决方案

环境:VS2010

1.页头上加上ValidateRequest="false"

 

<%@ Page Language="C#" ValidateRequest="false" MasterPageFile="~/MasterPages/MasterPage.master" AutoEventWireup="true"

    CodeBehind="AddResource.aspx.cs" Inherits="AZMIS.ResourceMaintain.AddResource"

    Title="Add new resource..." %>


2.web.config在<system.web>节点加上<httpRuntime requestValidationMode="2.0"/>

<system.web>

    <httpRuntime requestValidationMode="2.0"/>

</system.web>

 

你可能感兴趣的:(request)