问题,像如下例子,我有两个服务,模板几乎是完全一样(只是参数有些变化)
eg:
TestService实际请求的类似于 http://service.svc/abc?key1=value1
TestServiceRequired实际请求的类似于 http://service.svc/abc?key1=value1&key2=value2
这样的结果就回报错:
System.InvalidOperationException was unhandled by user code Message="UriTemplateTable does not support multiple templates that have equivalent path as template 'subscriptions?format=json' but have different query strings, where the query strings cannot all be disambiguated via literal values. See the documentation for UriTemplateTable for more detail." Source="System.ServiceModel.Web"
请问我要如何解决?
[OperationContract]
[WebGet(UriTemplate = "/abc")]
public List<string> TestService()
{
}
[OperationContract]
[WebGet(UriTemplate = "/abc")]
public List<string> TestServiceRequired()
{
}