Search code examples
c#.netwcfwcf-data-services

Cannot get WCF Data Services samples to run


Running Windows 7 Enterprise. VS2013 installed.

I am unable to run any WCF Data Services applications. (e.g. http://code.msdn.microsoft.com/WCF-Data-50-for-OData-v3-53074189)

I receive the following exception:

Configuration endpoint extension 'standardEndpoints/webHttpEndpoint' could not be found. Verify that this endpoint extension is properly registered in system.serviceModel/extensions/endpointExtensions and that it is spelled correctly.

I had a coworker try and they were able to run the sample immediately with no exception.

I feel like this means some sort of WCF component is missing, but Google is of no help on this one.

Can anyone help?


Solution

  • I figured it out.. the problem was that I was somehow missing the extension definition for webHttpEndPoint in my machine.config.

    e.g.

      <system.serviceModel>
        <extensions>            
            <endpointExtensions>                
                <add name="webHttpEndpoint" type="System.ServiceModel.Configuration.WebHttpEndpointCollectionElement, System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />                
            </endpointExtensions> 
        </extensions>
      <system.serviceModel>