I have Windows Service developed in C#
I have Windows Server 2012 with 2 private queues: queueRequests and queueResponses.
My queues are not transactional.
I have Client that execute Console Application with credentials MyDomain\UserDeploy .
Windows Service in Server is executed with credentials MyDomain\UserAgent.
MyDomain\UserAgent and MyDomain\UserDeploy user has Full control about queues: queueRequests and queueResponses.
Server and Client are in the same MyDomain.
Console Application Client to send message and read message from/to private queue in Server.
Windows Service in Server to send message and read message from/toprivate queue.
Execution Steps:
Console Application Client send Message A to private Queue queuerequests in Server
Windows Service read Message A from private queue queuerequests
Windows Service sendMessage B to private queue queueresponses
Console Application Client read Message B from private queue queueresponses.
It was working all steps.
Now, I don't know the reason, the step 4 fails. Client Not reads message from remote queue.
I don't understand why: Client can send message to queue, but not reads from queue.
I get a MessageQueueException but exception.Message is empty.
Any suggestions for get good troubleshooting ?
Fragment code:
const string ForSend = @"FormatName:DIRECT=OS:{0}\private$\DeploymentCommands";
const string ForRead = @"FormatName:DIRECT=OS:{0}\private$\DeploymentResponses";
private DeploymentResponse WaitForResponse()
{
try
{
Message rsp = colaStatus.ReceiveByCorrelationId(correlationId, new TimeSpan(0, timeOut, 0));
DeploymentResponse ret = rsp.Body as DeploymentResponse;
Console.WriteLine("Respuesta WaitForResponse:" + ret.DeploymentId + " - " + ret.Status);
Trace.WriteLine("Respuesta WaitForResponse:" + ret.DeploymentId + " - " + ret.Status);
return ret;
}
catch (MessageQueueException ex)
{
Console.WriteLine("Error WaitForResponse in remote server " + remoteServer + ". " + ex.Message);
Trace.WriteLine("Error WaitForResponse in remote server " + remoteServer + ". " + ex.Message);
return null;
}
catch (Exception)
{
throw;
}
}
More about MessageQueueException .
I get
Message: null
MessageQueueErrorCode -2147023169
ErrorCode -2147467259
but not found that code in MessageQueueErrorCode Enumeration.
-2147023169 value. In Hex: 800706BF
-2147467259 value. In Hex: 80004005
Not much info about those codes. Only I get:
0x80004005 -2147467259 E_Fail
0x800706BF -2147023169 PRC_S_Call_Failed_DNE
Full trace exception:
Message: - MessageQueueErrorCode -2147023169 - ErrorCode-2147467259 StackTrace:
at System.Messaging.MessageQueue.MQCacheableInfo.get_ReadHandle()at System.Messaging.MessageQueue.ReceiveBy(String id, TimeSpan timeout, Boolean remove, Boolean compareId, Boolean throwTimeout, MessageQueueTransaction transaction, MessageQueueTransactionType transactionType)
at System.Messaging.MessageQueue.ReceiveByCorrelationId(String correlationId, TimeSpan timeout)
at DeploymentAgent.Client.DeploymentInvoker.WaitForResponse()