Can we create netTcpBinding endpoint??

Topics: General Discussion Forum, Service Factory Modeling Edition Forum
May 22, 2008 at 4:37 PM

when I tried creating endpoint, I see following are the only options I have


I am looking for netTcpBinding.. I am not sure if I messed up something or limitation of this software factory..

any information in this regard would help me to decide to use this factory or not..

May 22, 2008 at 5:10 PM
You're right. The factory only provides those two options out of the box.
However, nothing stops you from generating with one of them (i.e basicHttpBinding) and updating the web.config file with "netTcpBinding". That should be pretty straighfoward.
Jun 2, 2008 at 2:03 PM
What has to be done to switch from wsHttpBinding to netTcpBinding?
Is there just some modifications in the configuration file? What code must be written?

I guess if you owe both side (the client and service) and both is within the same LAN there is no point to use something else than netTcpBinding. Which means that you are doing Remoting in a new way, right?
Jun 2, 2008 at 5:09 PM
Edited Jun 2, 2008 at 9:22 PM
Hi RightCoder,

To modify the endpoint's binding you can simply switch its binding attribute to netTcpBinding in the host's web.config, as previously mentioned. On the other hand, if you'd like to customize the WSSF to support this option while designing your host, you should add the "netTcpBinding" value to an enumeration that is used for this matter:

  1. Make sure you are using the WSSF: Modeling Edition Source Code version.
  2. Open the Service Factory Guidance Package solution (Service Factory Guidance package.sln file located in the directory chosen during WSSF Source installation).
  3. Navigate to Extenders --> Microsoft.Practices.ServiceFactory.Extenders.HostDesigner.Wcf --> BindingType.cs
  4. Add the netTcpBinding value to the BindingType enumeration.
  5. Close any additional VisualStudio instances you may have opened and build the Microsoft.Practices.ServiceFactory.Extenders.HostDesigner.Wcf project.

Regarding the scenario you described, a firewall could be a possible reason why you would still use basicHttpBinding or wsHttpBinding even within a LAN. It's not that you couldn't modify some
security policies on the firewall to make it work, but it would be a bit more straightforward.