Domanda

I receive an exception of type

Exception receiving EMS message: The service did not respond. When calling the code below from more than one task.

Task.Factory.StartNew(() =>
{ 
        var service = CreateChannel();                                           
        try
        {
              return service.GetStuff(string blah);
        }
        finally
        {
               var channel = ((IClientChannel)service);
               try
               {
                    channel.Close();
               }
               catch
               {
                    channel.Abort();
               }
         }
 });
private IService CreateChannel()
{
    lock (_channelFactory)
    {
        return _channelFactory.CreateChannel();
    }            
}

If i remove the Channel.Close() there is no exception.

Any ideas?

È stato utile?

Soluzione

Self Answer

Updating my tibco.ems.wcf assembly fixed this.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top