wcf callback method does not executed

276 Views Asked by At

1. MY service is on console application and my client is on windows application.

2. The service has a contract and my client has callback contract.

The problem occurs when the client activate a method on the service and that method activate the client's callback but that method does not excuted! The big shock is when the client is on console application, the callback IS excuted in the same situation.

Service contract imp:

        [ServiceBehavior(
               InstanceContextMode = InstanceContextMode.Single,
               ConcurrencyMode = ConcurrencyMode.Multiple,
               IncludeExceptionDetailInFaults = true
                )]
            public class ServerContractImplementation : IServerContract
            {
    private void NotifyOnDownloadAsync(int TorrentID, int ClientID)
            {
                    ...
                    IClientCallBackContract ICCC = this.ConnectedClients.Single(ConnectedClient1 => ConnectedClient1.Key.ClientID == ClientID).Value;
                    ICCC.AddSeeders(TorrentID, Seeders);
                    ...
            }
    }

Client's callback contract imp:

[ServiceBehavior(IncludeExceptionDetailInFaults=true)]
    internal class ClientCallBackContractImplementation : IClientCallBackContract
    {
public void AddSeeders(int TorrentID, IEnumerable<ReplacementObjects.Client> Clients)
        {
            ....
        }
}

Same code works on client console aplication but not working on client windows application.

0

There are 0 best solutions below