ContractFilter mismatch at the EndpointDispatcher exception

I have the following scenario that I'm trying to test for:

  • A common WSDL
  • WCF endpoint that implements objects based on the WSDL and is hosted in IIS.
  • A client app that uses a proxy based off the WSDL to create requests.
  • When I make a web service call from the client to the service endpoint, I get the following exception:

    {"The message with Action 'http://IMyService/CreateContainer' 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, eg Message, Transport, None)."}

    I started using MS Service Trace Viewer, but not sure where to look. While looking at classes in client and the endpoint, they appear identical.

    How does one begin to debug this problem?

    What are some possible causes to this exception?


    A "ContractFilter mismatch at the EndpointDispatcher" means the 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.

    This can be because:

  • You have different contracts between client and sender.
  • You're using a different binding between client and sender.
  • The message security settings are not consistent between client and sender.
  • Have at look at the EndpointDispatcher class for more information on the subject.


    I had this error and it was caused by the recevier contract not implementing the method being called. Basically, someone hadn't deployed the lastest version of the WCF service to the host server.


    I had this problem and found that in my proxy generator, which I copied from another service, I forgot to change the name of the service.

    I changed this...

    Return New Service1DataClient(binding, New EndpointAddress(My.Settings.WCFServiceURL & "/Service1Data.svc"))
    

    to...

    Return New Service2DataClient(binding, New EndpointAddress(My.Settings.WCFServiceURL & "/Service2Data.svc"))
    

    It was a simple code error, but nearly impossible to debug. I hope this saves someone time.

    链接地址: http://www.djcxy.com/p/95928.html

    上一篇: 交易仅在客户端开始

    下一篇: ContractFilter在EndpointDispatcher异常处不匹配