Tuesday, September 27, 2011

WCF : WCF Test Client “The contract ‘IMetadataExchange’ in client configuration does not match the name in service contract”


Playing around with WCF web services in VS 2010 and .NET Framework 4.

When I run the WCF Test Client across the web service I get the above error. The service still works but there’s an error symbol (a ! in a red circle on the LHS).

Mr. Google to the rescue and you need to change the framework config file here:


Comment out the “endpoint” section i.e.

  <!-- <endpoint address="" binding="netTcpRelayBinding" contract="IMetadataExchange" name="sb" /> -->

Problem solved.

Even though it still works, I hate these niggly errors in case I’ve screwed up Smile



Anonymous said...


Anonymous said...

Really.. Thanks for your post