[ASP.NET]Error: A potentially dangerous Request.QueryString value was detected

Error Message

"A potentially dangerous Request.QueryString value was detected from the client " 

Cause

.NET Framework 1.1 is installed on an application that was developed using .NET 1.0. .NET 1.1 uses a higher security setting by default, so a security message that 1.0 users don't see is visable.

Solution or Workaround

Disable these error messages by lowering the security settings. Set validateRequest=false in the Page directive of the *.aspx page that displayed the error. This will turn off request validation for that page only.

The first line should be similar to this in VB.NET:

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="TestWebGUI.WebForm1" validateRequest=false%> 
or
<configuration>
   
<system.web>
      
<pages validateRequest="false" />
   
</system.web>
</configuration>

Other References: Request Validation - Preventing Script Attacks

posted @ 2008-03-13 10:10  looping  阅读(458)  评论(0编辑  收藏  举报