Friday, April 20, 2012

Microsoft WCF Test Client error after installing BizTalk Service SDK

Ever since adding a bunch of BizTalk stuff to my development machine, I’ve had a (admittedly) small problem with the WCF test client (wcftestclient.exe).
Every time I added a new service, I got this error:

Or for you robots:
Microsoft WCF Test Client
The contract 'IMetadataExchange' in client configuration does not match the name in service contract, or there is no valid method in this contract.
To recover, please manually correct client configuration.

Or restore to default configuration.

Or check "Always regenerate config when launching services" in the Tools -> Options menu, then refresh the service.
Mind you, after pressing ok wcftestclient worked just fine, except for this error in the UI:

Today I finally got time to fix the problem. A bit of Googling let me to this post:
Stating both the cause of the problem (installing the BizTalk Services SDK) and (almost) the solution to my problem.
However, I didn’t find the section mentioned in the post, but in my 32-bit framework 4 machine.config:
I found this section:
       <endpoint binding="sqlBinding" contract="IMetadataExchange" name="mssql"/>
                     <extension … />
                     <extension … />

Comment this out and you are good to go (at least while not using the SDK) :

No comments: