0

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.

Stav Alfi
  • 13,139
  • 23
  • 99
  • 171
  • Did you ever fix this problem? If so could you post an answer? thanks :) – Sam Jan 09 '14 at 09:53
  • yes i solved it. I dont remmber exacly how but may be by openning the service in the serve side on diffrent thread. – Stav Alfi Feb 01 '14 at 13:25
  • This is answered here: http://stackoverflow.com/questions/43013991/wcf-named-pipes-timeout-in-a-winapp-but-not-in-a-consoleapp/ – Igor Labutin Mar 27 '17 at 14:09

0 Answers0