[英]WCF- ContractFilter mismatch at the EndpointDispatcher
I have this WCF exception. 我有这个WCF例外。 I've checked this SO question, but I'm still not sure of what's wrong 我已经检查了这个问题,但是我仍然不确定出什么问题
Actual exception message- 实际异常消息-
The message with Action 'http://tempuri.org/ITramsApplicationService/GetAllApplications' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).
I've tried to modify my binding configuration on both the client and the WCF service, but that didn't help 我尝试修改客户端和WCF服务上的绑定配置,但这无济于事
Config at WCF Service- 在WCF服务上配置-
<basicHttpBinding>
<binding name="FileServiceConfiguration" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="1638400" maxArrayLength="2097152" maxBytesPerRead="409600" maxNameTableCharCount="1638400" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
<service behaviorConfiguration="Default" name="Tavisca.TramsFileService.ServiceImplementation.TramsApplicationServiceImpl">
<endpoint address="" binding="basicHttpBinding"
bindingConfiguration="FileServiceConfiguration" contract="Tavisca.TramsFileService.ServiceContracts.ITramsApplicationService" />
</service>
Config for client/consumer- 为客户/消费者配置
<endpoint address="http://localhost:20020/TramsFileService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ITramsApplicationService"
contract="TramsFileServices.ITramsApplicationService" name="BasicHttpBinding_ITramsApplicationService" />
<binding name="BasicHttpBinding_ITramsApplicationService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="1638400" maxArrayLength="2097152" maxBytesPerRead="409600" maxNameTableCharCount="1638400" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
In general case it means that receiver could not process the message because it did not match any of the contracts the receiver has configured for the endpoint which received the message. 在一般情况下,这意味着接收者无法处理该消息,因为它与接收者为接收该消息的端点配置的任何合同都不匹配。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.