In this post, I will show you how to host WCF service in IIS using TCP protocol. By default, the TCP WCF activation service is not enabled on your machine. You can follow these steps to enable the TCP activation for WCF services:
- Go to Control Panel | Programs | Turn Windows features on or off.
- Expand the Microsoft .Net Framework 3.5.1 node on Windows 7
- Check the checkbox for Windows Communication Foundation Non-HTTP Activation on Windows 7
Next, Create the IIS application to host the WCF application using TCP protocol. Follow these steps
- Open run command and type inetmgr
- Create a new application and point to the physical folder.
- Select the DefaultAppPoll and make sure your default app pool is a .NET 4.0.X application pool.
- Right-click on the web application, select Manage Application | Advanced Settings and then add net.TCP to Enabled Protocols. (Make sure you use all lowercase letters and separate it from the existing HTTP protocol with a comma)