Wednesday, 15 June 2016

WCF Service - Configuration binding extension 'system.serviceModel/bindings/netHttpBinding' could not be found

I've just written a test WCF service for using web sockets.

When I publish the service and try to browse to it shows the following error:

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

The solution to this is to add the following in the web.config:

<system.web>
    <compilation debug="true" targetFramework="4.6"/>
    <httpRuntime targetFramework="4.6"/>
</system.web>

Adding the httpRuntime value fixed the issue.