0

我们正在尝试在我们使用的一个软件中创建一个脚本表达式,当我们在模拟器中测试脚本时,它测试正常并按预期返回“false”但是当我们单击保存以保存脚本时,我们得到以下错误:

从客户端检测到潜在危险的 Request.Form 值 (EventRuleControl$Accordion$Step4$Container$0_/WebControls/EventExpressions/ScriptExpressionControl.ascx_7d6147f9-8171-494a-8797-bc8f1b092de8$TextBoxScript="...(var x=0 ;x<user_tags.length;x+...")。

下面是我们试图保存以供执行的脚本:

    var user_tags = session.user.getTags();
for(var x=0;x<user_tags.length;x++) {
  //log(user_tags[x].name);
  if(user_tags[x].name == "Tag 1") {
 if(fields.get("Speed",0) >= 5) {
   return true;
 }
  }
}


return false;

我们尝试添加:

<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" validateRequest="false"/> & <httpRuntime requestValidationMode="2.0" /> to the <httpModules> section in System.web of our web.config but to no avail.

任何帮助将不胜感激。

为了清楚起见,我们的应用程序在 NET 上运行。4.0

4

0 回答 0