AppFabric : Configuration binding extension could not be found.

I have recently installed the Windows Azure AppFabric SDK because I’m writing an article for the Dutch .NET Magazine. Problem is I try to do everything in Visual Studio 2010 these days, just because it’s so cool to have something that’s buggy. Seriously! Sometimes you get headaches because you just can’t figure out why something’s not working, only to find out it’s because it really isn’t working because of the current beta version you’re working with. But on the other side it’s really fun and you learn a lot.

As now, when I got the following message.

Configuration binding extension ‘system.serviceModel/bindings/netTcpRelayBinding’ could not be found. Verify that this binding extension is properly registered in system.serviceModel/extensions/bindingExtensions and that it is spelled correctly.

It’s a System.ConfigurationErrorsException which can mean that you might be right with what you configured, the .NET runtime just can’t figure out what it is that is wrong. This time it’s because some extensions to WCF weren’t added to the machine.config of .NET 4.0 RC. It was however added to the machine.config of .NET 2.0 so I took it from there. And for future reference for my dear readers and all others that come in via Google, I’m posting the fix here.

Sidenote : I’m using 2.0.50727 and 4.0.30128 version of the .NET Framework, but the versions might differ on your machine.

Go to C:WindowsMicrosoft.NETFrameworkv2.0.50727CONFIG and read the machine.config from there. In the node configurationsystem.servicemodelextensions you find two nodes. The first is bindingElementExtensions and the second is bindingExtensions. You’ll see some bindings with a name that contains “relay” in it. Copy these into notepad or so.

Now open up C:WindowsMicrosoft.NETFrameworkv4.0.30128Config and edit the machine.config there. Copy the lines from the 2.0 config that are missing in the 4.0 config and your AppFabric service should be able to start.

You may also like...

3 Responses

  1. Erwyn van der Meer says:

    You can’t possibly have installed the Windows Azure platform AppFabric because it only runs in the cloud 😉 But you might have installed the SDK though.

    The client components are not supported on .NET 4 yet, that’s why the SDK doesn’t change the .NET 4 machine.config. So the easiest option is to use multi-targeting in VS 2010 and target .NET Framework 3.5. But if you add the config manually to .NET 4 it will probably work fine.

  2. Dennis van der Stelt says:

    @Erwyn : You’re right, I’ve changed the article! Thanks 🙂

  3. Rob Fox says:

    Hi Dennis! Just want to add, you shouldn’t forget to update both machine.configs (32 AND 64 bits).
    For me also the entire Microsoft.ServiceBus.dll was missing, probably because I had previously installed AppFabric v1.0, but replaced it by the new CTP release v2.0.

    Anyway, your post was helpful to me 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *