C# WCF-EndpointDispatcher上的ContractFilter不匹配
我有这个WCF例外。我检查了这么多问题,但我仍然不确定出了什么问题 实际异常消息-C# WCF-EndpointDispatcher上的ContractFilter不匹配,c#,wcf,exception,wcf-binding,C#,Wcf,Exception,Wcf Binding,我有这个WCF例外。我检查了这么多问题,但我仍然不确定出了什么问题 实际异常消息- 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
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).
我尝试修改客户端和WCF服务上的绑定配置,但没有帮助
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>
客户端/消费者的配置-
<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>
在一般情况下,这意味着接收方无法处理消息,因为它与接收方为接收消息的端点配置的任何契约都不匹配 检查以下事项: 客户和发件人的合同必须相同。 客户端和发送方之间的绑定。 客户端和发件人之间的邮件安全设置必须一致。
这并不能解决问题,很可能不是绑定,而是两个契约中方法/数据成员的定义不匹配。尝试更新服务引用。