【发布时间】:2020-02-01 18:55:17
【问题描述】:
我在一个 WCF 中有多个合同:
namespace SysLap.Services.Web.DataExtractor
{
[ServiceContract]
public interface IServiceDataExtractor
{
[OperationContract]
[WebGet]
List<User> GetAllUsers(/*CommonParams commonParams*/);
}
[ServiceContract]
public interface IScopesExtract
{
[OperationContract]
[WebGet]
List<SyScope> GetAllScopes();
}
}
并且 Web.config 配置良好:
<endpoint address="rest" behaviorConfiguration="restBehavior"
binding="webHttpBinding" contract="SysLap.Services.Web.DataExtractor.IServiceDataExtractor" />
<endpoint address="rest" behaviorConfiguration="restBehavior"
binding="webHttpBinding" contract="SysLap.Services.Web.DataExtractor.IScopesExtract" />
</service>
对于 GetAllUsers 服务,它工作得非常好。但是对于 GetAllScopes 服务,当我使用 SOAP UI 对其进行测试时,我收到了这个错误:
<p class="heading1">Request Error</p>
<p>The server encountered an error processing the request. The exception message is 'Multiple filters matched.'.
See server logs for more details. The exception stack trace is: </p>
<p> at System.ServiceModel.Dispatcher.EndpointDispatcherTable.LookupInCache(Message message, Boolean&
addressMatched)
at System.ServiceModel.Dispatcher.EndpointDispatcherTable.Lookup(Message message, Boolean&
addressMatched)
at System.ServiceModel.Dispatcher.ChannelHandler.GetDatagramChannel(Message message, EndpointDispatcher&
endpoint, Boolean& addressMatched)
at System.ServiceModel.Dispatcher.ChannelHandler.EnsureChannelAndEndpoint(RequestContext request)
at System.ServiceModel.Dispatcher.ChannelHandler.TryRetrievingInstanceContextCore(RequestContext request)
</p>
我该如何解决?
谢谢
【问题讨论】:
-
能否将文本截图转换回纯文本?让其他人更容易搜索相同的问题。
-
当然可以,