0

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.

4

2 回答 2

1

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

于 2013-10-10T16:14:08.330 回答
1

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)]

于 2013-10-10T16:21:06.557 回答