Hello,
I've a console app with this code :
QueueClient Client = QueueClient.CreateFromConnectionString(connectionString, queueName);
ManualResetEvent CompletedEvent = new ManualResetEvent(false);
OnMessageOptions options = new OnMessageOptions();
options.AutoComplete = true;
options.MaxConcurrentCalls = 1;
options.ExceptionReceived += LogErrors;
Client.OnMessage((receivedMessage) =>
{
try
{
var wcfSrv = new UserService.UserServiceClient();
var response = wcfSrv.CreateActivationCode("code", new Guid(), "CODE_TYPE", 2);
receivedMessage.Complete();
}
catch (Exception ex)
{
receivedMessage.DeadLetter();
}
}, options);
Client.Close();
CompletedEvent.Set();
I don't know why the console crash out on :
var wcfSrv = new UserService.UserServiceClient();
It seems that I can't call a WCF service when i'm reading a queue ?
Thanks in advance for help