I get the error message "The requested message was not specified in the specified queue" when using transactions in the remote MSMQ. If the transaction is deleted or if the queue is moved to the same computer, everything works fine. The queue is located on a Windows 2008 machine, and the client (code shown below) runs on a computer running Windows 7.
//Throws above error using (MessageQueueTransaction mqTxn = new MessageQueueTransaction()) { mqTxn.Begin(); Message message = messageQueue.ReceiveById(peekedMessage.Id, mqTxn); mqTxn.Abort(); } //Throws above error using (TransactionScope txnScope = new TransactionScope()) { Message message = messageQueue.ReceiveById(peekedMessage.Id, MessageQueueTransactionType.Automatic); } //Works fine Message message = messageQueue.ReceiveById(peekedMessage.Id);
PS peekedMessage are messages viewed right before these calls. I checked that peekedMessage.Id matches the first element of the queue. The queue is transactional.
amit_g
source share