Question

I'm currently working on a service that involves client callback over netTcpBinding. However, I can't find answers to the following two questions:

  1. When a client invokes the service, what is the client's address that will be used for callback?
  2. How can I programmatically change this address before the client invokes the service?

I understand that when working with wsDualHttpBindings, there is a property called clientBaseAddress that can be used to set the client address. However, netTcpBinding doesn't have a similar property?

Was it helpful?

Solution

netTcpBinding is bi-directional, so you don't need to do anything to specify the client's address.

The reason you have to specify it for wsDualHttpBinding is because that binding establishes 2 HTTP channels (since HTTP isn't bi-directional) - one for the client to the service, and the second one for the service to the client.

So to answer your questions:

  1. The address that will be used for the callbacks is the address of the client.

  2. You don't need to change the callback address with netTcpBinding. Indeed, you wouldn't want to change it for wsDualHttpBinding either - I think you meant how would you set it in code, and in this case you can't and don't need to.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top