The contract 'IMetadataExchange' in client configuration does not match the name in service contract.

Answered The contract 'IMetadataExchange' in client configuration does not match the name in service contract.

  • Tuesday, November 17, 2009 10:16 PM
     
     
    I am trying to run a test WCF tutorial and getting an error when I attempt to run it via F5:

    "The contract 'IMetadataExchange' in client configuration does not match the name in service contract. To recover, please manually correct client configuration. Or check 'Always regenerate config when launching services' in the Tools->Options Menu, then refresh the service."

    I am unable to find this option in Tools->Options. However the problem seems to be an artifact of installing the adapter pack for the BizTalk Development edition on my laptop. It appears to be looking for things like IMetadataExchange (SAP), etc.

All Replies

  • Wednesday, November 18, 2009 12:29 AM
     
     Answered
    Hi,


    Check this ou

    http://azure.snagy.name/blog/?tag=imetadataexchange
    http://blogs.msdn.com/wcftoolsteamblog/archive/2008/08/28/tips-for-wcf-tools-in-vs2008-sp1.aspx
    Please mark the response as answers if it solves your question or vote as helpful if you find it helpful. http://thoughtorientedarchitecture.blogspot.com/
    • Proposed As Answer by Haripraghash Wednesday, November 18, 2009 12:29 AM
    • Marked As Answer by Bill2010 Wednesday, November 18, 2009 12:47 AM
    •  
  • Friday, December 04, 2009 8:27 PM
     
      Has Code
    Hi, I too get the same error, however the client section for my machine.config looks different than the article :

    <client>
          <endpoint binding="sqlBinding" contract="IMetadataExchange"
          name="mssql" />
          <metadata>
            <policyImporters>
              <extension type="System.ServiceModel.Channels.ContextBindingElementImporter, system.workflowservices, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
            </policyImporters>
            <wsdlImporters>
              <extension type="System.ServiceModel.Channels.ContextBindingElementImporter, system.workflowservices, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
            </wsdlImporters>
          </metadata>
        </client>
    The end point's name here is mssql instead of sb. Can we follow the same troubleshooting steps in this case too?


    -Perennial Newbie-
  • Tuesday, February 21, 2012 6:39 PM
     
     
    Is there a better solution than commenting these Machine.config lines or uninstalling the BT SDK because I have BizTalk and use BizTalk including the SDK so uninstalling is not an option?