Wednesday, March 28, 2012

Enable net.tcp binding support in IIS 7.5

To optimize the performance of a WCF service I built, I decided to change the binding from wsHttpBinding to netTcpBinding.  So I added a second endpoint in my WCF configuration configured to use the netTcpBinding. After deploying the updated application to IIS I got the following error:

“Could not find a base address that matches scheme net.tcp for the endpoint with binding MetadataExchangeTcpBinding. Registered base address schemes are [http].”

Starting from IIS 7.0 other protocols then HTTP are supported. As I was using IIS 7.5 this couldn’t be the problem.

I found out that one extra step is required: you need to add the net.tcp binding to the binding of the application in IIS.

How can we do this?
  • Open the Internet Information Services Manager.
  • Right click on the virtual directory/application in IIS.
  • Choose Manage application -> Advanced settings.

image

  • In the Enabled Protocols part add net.tcp(separated by a comma) and that’s it.

image

No comments: