Reputation: 12341
i am implementing a wcf callback service following this tutorial.
The thing is that my callback method on the client side is never called.
public void NotifyClient(object sender, EventArgs args)
{
INotificationCallback callback = OperationContext.Current.GetCallbackChannel<INotificationCallback >();
callback.OnStepReached(((ModuleEventArgs)args).Step);
}
The callback is called on the server side but never reaches the client side. I don't know what went wrong, the only I've got is a TimeOutException after a while.
My callback on the server side is a System.Runtime.Remoting.Proxies._TransparentProxy
.
I'd like to know if there is an easy way to debug this behavior.
Upvotes: 0
Views: 439
Reputation: 685
The servicecontract and the callback contract should be one-way. The linked tutorial is missing that.
So, Update the operation contract to [OperationContract(IsOneWay = true)]
Upvotes: 1
Reputation: 7067
If you have not already, you may want to consider enabling WCF tracing to ensure the server is really calling the client callback method (callbackInstance.OnCallback(); ).
For reference, the following link provides an overview of WCF Tracing:
http://msdn.microsoft.com/en-us/library/ms733025.aspx
Upvotes: 1