There are several ways of fixing this problem and it usually involves editing your machine.config, web.config or app.config file. One of the possibilities that might have raised this error is a bug that you’ll encounter when uninstalling Microsoft Azure SDK. Apparently when you install the Microsoft Azure SDK, it adds a few lines to your machine.config file. However when you uninstall it, it doesn’t revert the changes causing your machine.config to refer to unavailable libraries.

So in order to fix this error, you’ll have to comment/delete these few lines from your machine.config file.

<!-- Under <behaviorExtensions> -->
<add name="connectionStatusBehavior" type="Microsoft.ServiceBus.Configuration.ConnectionStatusElement, Microsoft.ServiceBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="transportClientEndpointBehavior" type="Microsoft.ServiceBus.Configuration.TransportClientEndpointBehaviorElement, Microsoft.ServiceBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="serviceRegistrySettings" type="Microsoft.ServiceBus.Configuration.ServiceRegistrySettingsElement, Microsoft.ServiceBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<!-- Under <bindingElementExtensions> -->
<add name="tcpRelayTransport" type="Microsoft.ServiceBus.Configuration.TcpRelayTransportElement, Microsoft.ServiceBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="httpRelayTransport" type="Microsoft.ServiceBus.Configuration.HttpRelayTransportElement, Microsoft.ServiceBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="httpsRelayTransport" type="Microsoft.ServiceBus.Configuration.HttpsRelayTransportElement, Microsoft.ServiceBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="onewayRelayTransport" type="Microsoft.ServiceBus.Configuration.RelayedOnewayTransportElement, Microsoft.ServiceBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<!-- Under <bindingExtensions> -->
<add name="basicHttpRelayBinding" type="Microsoft.ServiceBus.Configuration.BasicHttpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="webHttpRelayBinding" type="Microsoft.ServiceBus.Configuration.WebHttpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="ws2007HttpRelayBinding" type="Microsoft.ServiceBus.Configuration.WS2007HttpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="netTcpRelayBinding" type="Microsoft.ServiceBus.Configuration.NetTcpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="netOnewayRelayBinding" type="Microsoft.ServiceBus.Configuration.NetOnewayRelayBindingCollectionElement, Microsoft.ServiceBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="netEventRelayBinding" type="Microsoft.ServiceBus.Configuration.NetEventRelayBindingCollectionElement, Microsoft.ServiceBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<!-- Under <client> -->
<endpoint address="" binding="netTcpRelayBinding" contract="IMetadataExchange"
    name="sb" />

<!-- Under <metadata><policyImporters> -->
<extension type="Microsoft.ServiceBus.Description.TcpRelayTransportBindingElementImporter, Microsoft.ServiceBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<extension type="Microsoft.ServiceBus.Description.HttpRelayTransportBindingElementImporter, Microsoft.ServiceBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<extension type="Microsoft.ServiceBus.Description.OnewayRelayTransportBindingElementImporter, Microsoft.ServiceBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

<!-- Under <metadata><wsdlImporters> -->
<extension type="Microsoft.ServiceBus.Description.StandardRelayBindingImporter, Microsoft.ServiceBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<extension type="Microsoft.ServiceBus.Description.TcpRelayTransportBindingElementImporter, Microsoft.ServiceBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<extension type="Microsoft.ServiceBus.Description.HttpRelayTransportBindingElementImporter, Microsoft.ServiceBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<extension type="Microsoft.ServiceBus.Description.OnewayRelayTransportBindingElementImporter, Microsoft.ServiceBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

Related posts:

  1. REAL DEVELOPMENT Reloaded Tour 2007
  2. Content Management System – Is creating one viable?
  3. Microsoft Application Lifecycle Management (ALM) Practitioner Conference in Malaysia
  4. Visual Studio 2008 Beta 2 Released
  5. Singularity Source Code Released to CodePlex
  • Bill Kuhn

    Thank You!!

  • Bill Kuhn

    Thank You!!

  • Bill Kuhn

    Thank You!!

  • Nikhiltayal

    Thank You!!! Saved lot of my debugging time with precise steps.

  • Ariane

    Thank you. This saved me a lot of time.

  • Sreenivas_mr

    hi,
    i have verified the machine configs. I do not have these entries in there. Still it does not work for me.

  • Sean Mackey

    Nice. Make sure to modify the machine.config @ C:WindowsMicrosoft.NETFrameworkv4.0.30319Config

  • Prasad

    When you want a WCF Service consumer web role to run from cloud, you need to take some more steps. The consumer connects to your on-premise WCF service using netTcpRelayBinding. These steps are not required if you want to run the consumer on local dev server.
    I tried the method explained on MSDN at http://msdn.microsoft.com/en-us/library/microsoft.servicebus.configuration.relayconfigurationinstaller.aspx, which explains that the tool named RelayConfigurationInstaller.exe needs to be run on VM as a startup task (on local machine, this tool is available in service bus SDK installation folder C:Program FilesWindows Azure AppFabric SDKV1.0AssembliesNET4.0). So I added the startup task to the role project config and re-deployed the package. Later, the consumer role came up and running and it also consumed on-premise WCF service running on my machine by connecting to service bus using net tcp relay binding. I also added to the role project the tool RelayConfigurationInstaller.exe and RelayConfigurationInstaller.exe.config so that these were available on the Azure VM.
    Startup task:
             

  • Prasad

    When you want a WCF Service consumer web role to run from cloud, you need to take some more steps. The consumer connects to your on-premise WCF service using netTcpRelayBinding. These steps are not required if you want to run the consumer on local dev server.
    I tried the method explained on MSDN at http://msdn.microsoft.com/en-us/library/microsoft.servicebus.configuration.relayconfigurationinstaller.aspx, which explains that the tool named RelayConfigurationInstaller.exe needs to be run on VM as a startup task (on local machine, this tool is available in service bus SDK installation folder C:Program FilesWindows Azure AppFabric SDKV1.0AssembliesNET4.0). So I added the startup task to the role project config and re-deployed the package. Later, the consumer role came up and running and it also consumed on-premise WCF service running on my machine by connecting to service bus using net tcp relay binding. I also added to the role project the tool RelayConfigurationInstaller.exe and RelayConfigurationInstaller.exe.config so that these were available on the Azure VM.
    Startup task:
             

  • Prasad

    When you want a WCF Service consumer web role to run from cloud, you need to take some more steps. The consumer connects to your on-premise WCF service using netTcpRelayBinding. These steps are not required if you want to run the consumer on local dev server.
    I tried the method explained on MSDN at http://msdn.microsoft.com/en-us/library/microsoft.servicebus.configuration.relayconfigurationinstaller.aspx, which explains that the tool named RelayConfigurationInstaller.exe needs to be run on VM as a startup task (on local machine, this tool is available in service bus SDK installation folder C:Program FilesWindows Azure AppFabric SDKV1.0AssembliesNET4.0). So I added the startup task to the role project config and re-deployed the package. Later, the consumer role came up and running and it also consumed on-premise WCF service running on my machine by connecting to service bus using net tcp relay binding. I also added to the role project the tool RelayConfigurationInstaller.exe and RelayConfigurationInstaller.exe.config so that these were available on the Azure VM.
    Startup task:
             

   
© 2009 - 2011 JustinLee.sg Suffusion theme by Sayontan Sinha