We are trying to create a script expression in a piece of software we use and when we test the script in the simulator it tests okay and comes back with 'false' as expected but when we click Save to save the script we get the following error:
A potentially dangerous Request.Form value was detected from the client (EventRuleControl$Accordion$Step4$Container$0_/WebControls/EventExpressions/ScriptExpressionControl.ascx_7d6147f9-8171-494a-8797-bc8f1b092de8$TextBoxScript="...(var x=0;x<user_tags.length;x+...").
Below is the script we are trying to save for execution:
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;
We've tried adding in:
<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.
Any assistance would be deeply appreciated.
For clarity our application is running on NET. 4.0