How to find the Client's Callback URL for a duplex HTTP binding, from within the service (WCF 3.5)?
Appreciate any help..
How to find the Client's Callback URL for a duplex HTTP binding, from within the service (WCF 3.5)?
Appreciate any help..
You normally find it trough
OperationContext.Current.GetCallbackChannel<T>()
Where T is the type of the CallBack interface defined in the contract.
To get the callback to the client in a duplex channel what you do is within the method that was invoked on the service you would call
OperationContext.Current.GetCallbackChannel<ICallbackContract>();
where ICallbackContract is replaced with the actual callback contract name.
Edit: Not sure what you mean by the phrase Clients Callback URL. If you mean the address of the client that could be obtained via:
EndpointAddress clientAddress = OperationContext.Current.Channel.RemoteAddress;