在调WebService的时候需要传XML格式的字符串,报错为:从客户端(....)中检测到有潜在危险的 Request.Form 值。
这是.net在页面Request值时,防止XSS攻击的一种策略.
处理方法:
- <system.web>
- <compilation debug="true" targetFramework="4.0" />
- <httpRuntime requestValidationMode="2.0" maxRequestLength="102400" executionTimeout="6000"/>
- </system.web>