Home » .Net FrameworkRSS

ContractFilter mismatch at the EndpointDispatcher

Configured a Windows Client App & a Windows Service Host App that implement Configuration Service 4.0.

Experiencing the following error:

Warning. Could not communicate with a remote host at startup. Exception is:

The message with Action 'getActiveHosts' 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 have been pulling out my hair trying to figure out what I have done wrong. Is this error a result of a problem with my Repository Databases or app.config files. I have rebuilt my client service contracts with "Service Client Generation" tool.

Thanks for any suggestions. 

 

2 Answers Found

 

Answer 1

getActiveHosts is a Config service  call (unless you have a business service contract  that defined the same method name, which I doubt).  Typically, this might be becuase of bindings that do not match all required parameters (such as security) between the sender/client binding  and the receiver/host binding.  You can get more detailed information by enabling WCF tracing for System.ServiceModel; see this article:

http://msdn.microsoft.com/en-us/library/ms733025.aspx

Can you post your client's web.config or app.config file; and your host's web.config or app.config file?  My guess is your client's app.config/web.config file has a config  service client  definition that is specifying the wrong  binding definition.  If you have changed the host's binding from the template bindings provided with Config Service, you need to make sure you have embedded in your client config file; and are actively using a corresponding compatible binding.  You can run svcutil.exe against your host  service to generate a .output file that will have the correct config service binding(s) your client can use to communicate  to the host config service endpoints.  Running diagnostic trace above will give you much more precise info on exactly why this is failing.  But it seems to be a Config Service communication issue between client/host; nothing to do with your custom/business services.

 

-Greg

 

Answer 2

Greg,

Thanks for the quick reply and a great Configuration service; enjoying the 4.0 version. The problem  turned out to be with my Repository database. Node ServiceType had same ServiceImplementationClassName & ServiceContract values as Config ServiceType. Not sure how that happened. Was not able to reproduce. Anyway, this also leads to a ContractFilter mismatch. Thanks again for your help.

-John

 
 
 

<< Previous      Next >>


Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter