我正在尝试向远程队列发送消息。
// Send a message to the queue.
if (myQueue.Transactional)
{
var myTransaction = new MessageQueueTransaction();
myTransaction.Begin();
Message objMessage = new Message();
objMessage.UseDeadLetterQueue = true;
objMessage.Body = message;
myQueue.Send(objMessage, myTransaction);
myTransaction.Commit();
}
else
{
Message objMessage = new Message();
objMessage.UseDeadLetterQueue = true;
objMessage.Body = message;
myQueue.Send(message);
}
但我有一个例外
The specified format name does not support the requested operation. For example, a direct queue format name cannot be deleted.
我假设我的队列名称不正确或者我有权限错误,所以我启用了死信队列,但它是空的。我的队列名称是“FormatName:Direct=TCP:xx.xxx.xx.xx\private$\Test”
谢谢