【发布时间】:2010-06-23 15:07:56
【问题描述】:
我有一个具有此声明操作的 WCF 服务:
[WebGet(UriTemplate = "Test/{*testString}")]
public String Test(String testString)
{
return testString;
}
但是,当尝试调用 URL Test/You%26Me 时,IIS 返回错误:
A potentially dangerous Request.Path value was detected from the client (&).
我的目标是通过其 URL-Encoding: %26 允许 URI 中的 & 符号
通配符没有帮助。有什么方法可以在不禁用安全功能的情况下防止此错误?
【问题讨论】:
标签: wcf iis ampersand webget uritemplate