Search code examples
c#entity-frameworkwcfcallbackwcf-callbacks

WCF Callback doesn't fire


I have a WCF Service with a Callback. Then i call a Callbackfunction everything works great except: Then i try to pass a List the Callback isn't called but also there is no Exception thrown. The Callback object is working since everything else works fine, i can also push the same class object as the one in the List. The Class object is declared as a [DataContract] and the Properties as [DataMember]. I also looped through the List, it is normaly generated by the Entity Framework.

    //IService
    [ServiceContract(CallbackContract = typeof(ICallbackService))]
    public interface IService
    {
        [OperationContract]
        void Login(string username, string password);

        [OperationContract]
        void RequestCards(Guid sessionID);
    }

    //Service
    public void RequestList(Guid sessinID)
    {
        User user = Users.FirstOrDefault(x => x.ID == sessinID);
        if (user != null)
        {
            user.Callback.PushList(DBCtx.GetAllEntitys());
        }
    }

    //ICallbackService
    public interface ICallbackService
    {
        [OperationContract]
        void LoginResult(Guid sessionID);

        [OperationContract]
        void PushList(List<Card> entitys);
    }

Solution

  • I'd add this as a comment but unfortunately I don't have enough points thingy. Would you be able to put tracing on your request and see if there's an exception happening that isn't exposing itself in the outer layers.

    MSDN