Reputation: 71
Need your help on consuming one of the WCF webservice. Its working service and in my application we are already consuming many methods from the service. I have just added the new method in WCF service. when I test the new method in WCF service it is working fine, there are no issues when I test the service alone. But I have added the new WCF service dll
to my web application and trying to consume my new method, I am always getting this error message, I don't understand what mistake I am doing here. Please help me.
Error:
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).
There is no issue with WCF service, because all other methods from the services works fine, except the newly added method.
var response = client.GetAllCountries(new GetAllCountriesRequest
{
Language = "Eng",
IndustryCode = "TP"
})
Upvotes: 1
Views: 613
Reputation: 1307
Here is what could possibly be your issue, when adding a new method to your service, you need to update the WSDL document by going to visual studio, right click on the service, and click UpdateConfiguration
Over time, the metadata for a WCF service may change, requiring that the service reference be updated.
.NET Updating Service Reference:
In Solution Explorer, right-click the service reference and then click Update Service Reference.
A progress dialog box is displayed while the reference is updated from its original location, and the service client is regenerated to reflect any changes in the metadata.
Updating Web Reference:
In Solution Explorer, open your project's App_WebReferences folder and click the node for the Web reference you want to update.
Right-click the reference and click Update Web Reference.
The new files for the XML Web service are downloaded to your project. Information for the XML Web service is updated within your project.
Upvotes: 0