As far as I understand, in HTTP the client connects to the server and requests data. The server cannot call the client. If so, how do WCF callbacks work?
Thanks,
Joe
When used with HTTP transport, the server calls the client. For this to work, the client must be in a public endpoint, so firewalls and something will need to be configured accordingly.
From http://msdn.microsoft.com/en-us/magazine/cc163537.aspx :
Due to its contactless nature, HTTP cannot be used for callbacks, and therefore you cannot use callbacks through BasicHttpBinding or WSHttpBinding. The Windows Communication Foundation offers callback support for NetTcpBinding and NetNamedPipeBinding, because the underlying transport is bidirectional. To support callbacks over HTTP, the Windows Communication Foundation provides WSDualHttpBinding, which actually sets up two HTTP channels: one for calls from client to service and one for calls from service to client.
And from the help for WSDualHttpBinding http://msdn.microsoft.com/en-us/library/system.servicemodel.wsdualhttpbinding.aspx :
This binding requires the client to have an open URI that provides a callback endpoint for the service. This is provided by ClientBaseAddress. Double binding provides the client IP address to the service. The client must use security to ensure that it only connects to services that it trusts.
The WCF duplex HTTP client (for example, when using wsDualHttpBinding ) will also start the server to listen for requests from the "real" server when it is called back.
wsDualHttpBinding
Thus, this will not work on NAT, to name one.
Source: https://habr.com/ru/post/900494/More articles:In what situations are compiler optimized lists in F #? - optimizationProper initialization and preferences in the Xtext-based Eclipse plugin - eclipsehow to get the total length of a video in a video in android - androidDelete array contents based on index set - ruby | fooobar.comError: add a reference to the assembly 'System.ServiceModel, Version = 3.0.0.0' - c #sensorPortait typo - androidXcode iphone sim not working retina? - objective-cHow to use the LOAD DATA INFILE statement when the file is in a different location? - mysqlIs there a way to use @ Html.HiddenFor for the full model? - asp.net-mvc-3Windows Live OAuth ID with development environment in C # .net - windowsAll Articles