I’m trying to learn WCF and I’ve created a new WCF Service Library project in VS2010. I haven’t made any changes to the default project but when I run it the WCF Test Client displays an error. When I navigate to the metadata endpoint in a browser the result is a blank page.
What am I missing? I would have hoped that a brand new, untouched project would work correctly.

Here’s the full error:
Error: An error occurred in the tool.Error: 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.
The service host seems to working properly.

Here’s the config file. Just as it was “out-of-the-box”
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation debug="true" />
</system.web>
<!-- When deploying the service library project, the content of the config file must be added to the host's
app.config file. System.Configuration does not support config files for libraries. -->
<system.serviceModel>
<services>
<service name="SrvLib.Service1">
<host>
<baseAddresses>
<add baseAddress = "http://localhost:8732/Design_Time_Addresses/SrvLib/Service1/" />
</baseAddresses>
</host>
<!-- Service Endpoints -->
<!-- Unless fully qualified, address is relative to base address supplied above -->
<endpoint address ="" binding="wsHttpBinding" contract="SrvLib.IService1">
<!--
Upon deployment, the following identity element should be removed or replaced to reflect the
identity under which the deployed service runs. If removed, WCF will infer an appropriate identity
automatically.
-->
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<!-- Metadata Endpoints -->
<!-- The Metadata Exchange endpoint is used by the service to describe itself to clients. -->
<!-- This endpoint does not use a secure binding and should be secured or removed before deployment -->
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information,
set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="True"/>
<!-- To receive exception details in faults for debugging purposes,
set the value below to true. Set to false before deployment
to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
This error is usually caused by a bad configuration in the “machine.config” file used by the .NET framework. Perhaps you installed the Windows Azure SDK and uninstall it, or the AppFabric SDK. In any case, you have entries in some sections that are causing these error.
Here the bindings from my machine.config found in C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config:
See if you have other entries there and remove them.