Click here to Skip to main content
12,550,447 members (45,211 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


12 bookmarked

WCF NetTcp Binding

, 28 Jan 2014 CPOL
Rate this:
Please Sign up or sign in to vote.
Optimize Your WCF Performance By NETTCP

NetTcp binding is based on Transmission Control Protocol. This is the most efficient binding and intended to be used in service to service communication in an intranet environment. The NetTcpBinding generates a run-time communication stack by default, which uses transport security, Transmission Control Protocol for message delivery, and a binary message encoding. Use this binding when you want to provide a secure and reliable binding environment for .NET-to-.NET cross-machine communication. NetTcpBinding is the equivalent of .NET Remoting in .NET 3.0, with the advantage that it is easier to code.

On the other hand, HttpBinding is based on HTTP protocol. It is compatible with Web Service Technology and SOAP standard, which are heavier than Transmission Control Protocol.

Characteristics And Limitations

  • It can only be consumed by WCF-enabled clients.
  • Transport security is turned on by default.
  • The service can be hosted in IIS 7.0 or later.
  • It supports the WS* stack, including reliable messaging, message security, and secure transactions.
  • It supports only intranet environment where the firewall configuration can be controlled.

Key Performance Areas

  • Increases in throughput of data notifications a client application can receive from the server
  • Allows more clients to be connected concurrently to the server
  • Reduces the Bandwidth utilization

Useful posts to learn more about NetTcp Binding and its advantages:

NetTCP Binding Configurations

<service name="MyServiceNamespace.SSM">
<binding name="ultra"
<security mode="None">
<message clientCredentialType="None"/>
<transport protectionLevel="None" clientCredentialType="None"/>
<reliableSession enabled="false"/>
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>

Deployment Steps

Step 1

A very first step is to let the IIS support netTcp Binding, by default IIS only supports HTTP or HTTPS to do that. First, we need to activate the WCF non-HTTP activation. Go to control panel > Program and Features > Turn Windows features on or off, then look for ‘Microsoft .NET Framework 3.5.1′ .

Select both the options under the umbrella of 'Microsoft .NET Framework 3.5.1' .

Step 2

As Step 1 automatically unregisters the ASP.NET, you need to register it with IIS again. Go to Visual Studio Command Prompt and type 'aspnet_regiis -i'. This command will register the ASP.NET with IIS.

Step 3

Now check these Windows services running. Go to Run > services.msc and look for the highlighted services. Start them if these are in Stopped state.

Step 4

Now configure IIS to enable a website to use net.tcp port which is 808 by default. You can also change it to any other port you want. Make sure you don’t configure net.tcp to port 80 because it is being used by HTTP and you cannot have two protocols running on the same port. Open IIS and then go to your ‘Default Web Site’ and right click on it and then go to ‘Edit Bindings’. Select net.tcp option from dropdown list.

Step 4.5

Now assign the port address to IIS to listen TCP requests. 808 is a default port but you can have any other port as well. Format is ‘port:ipaddress’ I use ’808:*’ and then click ok.

Step 5

Now enable net.tcp protocol for your application in the IIS. Right click on your application in the IIS and then click on ‘Advanced Settings’ and look for property ‘Enabled Protocols’ and enter ‘net.tcp’. It is a comma-separated list so you can enable multiple protocols by separating them with a comma.


Using netTcp binding helps improve your application performance up to 80%. There are some links earlier in this post where you can check performance statistics of netTcp binding. Performance is one of the considerations of using netTcp binding. There are many more advantages to use this binding such as reliable messaging, port sharing, controlled firewall configuration and cross-machine communication.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Kashif Akhter
Team Leader
Pakistan Pakistan
A computer software development professional with a proven track record of extensive experience of enterprise software development and building the manageable, scalable, and robust enterprise software architectures.

You may also be interested in...

Comments and Discussions

Question??? Pin
hhe10238-Oct-15 4:08
memberhhe10238-Oct-15 4:08 
QuestionEfficeny Pin
dommy1A3-Feb-14 4:51
memberdommy1A3-Feb-14 4:51 
AnswerRe: Efficeny Pin
Kashif Akhter3-Feb-14 8:18
professionalKashif Akhter3-Feb-14 8:18 
GeneralRe: Efficeny Pin
dommy1A4-Feb-14 0:58
memberdommy1A4-Feb-14 0:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.161021.1 | Last Updated 28 Jan 2014
Article Copyright 2014 by Kashif Akhter
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid