Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF with Binary over TCP

Tags:

c#

asp.net

tcp

wcf

WCF Binary over TCP option, is it applicable only for Intranet or Internet also?

Is TCP applicable only for Intranet?

like image 943
user274915 Avatar asked Mar 15 '10 16:03

user274915


2 Answers

The serializer and the transport are largely unrelated. There are pre-configured bindings for common scenarios, but my understanding is that you can plug the binary serializer (NetDataContractSerializer) into any transport. Or write your own ;-p

However - a different transport may be trickier to configure (firewalls etc) than plain HTTP.

See here (although I would dispute the speed claim; I've seen NetDataContractSerializer thrashed on occasion...)


Re comment - not so much the transport (I suspect you're best off staying with http), but consider this and this. An alternative binary serializer, excellent for sending some types of messages. And it plays nicely with MTOM (over http) too.

like image 162
Marc Gravell Avatar answered Nov 04 '22 14:11

Marc Gravell


The answer is: it depends. As far as I know, WCF's binary encoding requires both endpoints to be WCF endpoints (which would currently limit you to Windows unless/until Mono supports binary encoding). The other issue would be whether or not you can reach the port on which the remote server is listening. One of the reason running services over HTTP has become so popular is that port 80 is much more like to be open.

like image 23
Matt McClellan Avatar answered Nov 04 '22 15:11

Matt McClellan