Click here to Skip to main content
15,885,244 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have an existing "service", TCP Clients communicating with a server (over the internet) that has corresponding TCP Listener. I am replacing this with a WCF service hosted using netTcpBinding. Understandably, when the WCF service host receives request from the old TCP client, it does not process it and terminates the connection.

Is there some way for me to peek at the message that the WCF service host is not able to process? The endpoint message inspectors do not work, as the host is unable to assign this message to any of the active endpoint (as expected). The service host UnknownMessageReceived event does not fire either. Please advise.
Posted
Comments
Sergey Alexandrovich Kryukov 27-Apr-15 22:27pm    
It all depends on how you design the application-layer protocol in first place. Without knowing it, this is talking about nothing. Aren't you are saying that you did not foresee the possibility of newer version of the protocol in earlier version? It can make problem extremely tricky. The solution need more detailed considerations of all you have, and also the deployment history, if any.
—SA
Vipul Prashar 27-Apr-15 22:52pm    
Hi Sergey. Thanks for the quick response. I am not sure what you mean by application layer protocol. This is raw TCP communication where objects were binary serialized and passed between client and server (original TCP Client and Listener)
Regardless of what the original methodology was, is there a way to log the incoming message bytestream if a WCF service host is unable to handle it altogether.
Sergey Alexandrovich Kryukov 27-Apr-15 23:24pm    
This is the common mistake. How come you are not sure? You should be. There is always an application-layer protocol over TCP. Only it can be not explicitly formulated, but then it's not good for you. And your protocol is custom, it does not have a well-known name. But better give it a name, at least insider your application. Look:
http://en.wikipedia.org/wiki/Transmission_Control_Protocol,
http://en.wikipedia.org/wiki/Application_layer.

I think I explained you what is the problem with your issue. Let me understand it: what does it mean, "old TCP client"? Have you already deployed it to your customers? If you have, your situation could be pretty difficult. To attempt to resolve it, as I say, knowing a lot of detail will be needed.

—SA

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900