How to configure the WCF service to work as a regular TCP server?

How to configure the WCF service to work as a regular TCP server? Is it possible to disable all the specific things related to this in order to save the URL of the service http: //example.com-00-00444/service and be able to work with pure HTTP / TCP streams?

I need to be able to work with TCP streams in tandem with WCF services ... so I need to make a TCP server from one of my WCF services or (and I don't know how to do this) make my self-service WCF services work in tandem with my autonomous TCP server. However, I just can't find how to get them to share the same port in order to be able to call http://example.com:4444/WCFservice/ http://example.com-00-00444/TCPserver/ (And I have to getting them to share it, and 2 ports is not an option.)

+2
source share
2 answers

The easiest way to add a TCP endpoint to a service is to modify the web.config file in relation to the "WCF Service Configuration Editor". You can find it in the Visual Studio Tools menu in the web.config context menu (also in VS). You need to add a new endpoint using netTcpBinding. The address of such a new endpoint will begin with "net.tcp: //". For more information, you can read http://msdn.microsoft.com/en-us/library/cc949080.aspx .

To exchange net.tcp ports, read http://msdn.microsoft.com/en-us/library/aa395195.aspx or google for: sharing wcf tcp endpoint ports.

A good overview of the new WCF 4 features can be found at http://msdn.microsoft.com/en-us/library/ee354381.aspx

And easily, if someone does not understand the benefits of WCF, it is compared to Winsocket programming. 15 years ago I used sockets and found it cool. Then I used RPC, DCOM, etc. Now WCF is the best way if you are thinking of endpoint authentication. So skip some of the previous comments.

+3
source

If you want to work with pure TCP streams, you are likely to work with sockets directly, not with WCF.

Use WCF if you want all things to be automatically implemented for you at the transport level.

+3
source

All Articles