[英]Sending message to private MSMQ queue with Authenticate checkbox checked?
Before posting this question, I searched through all forum threads. 在发布此问题之前,我搜索了所有论坛帖子。 I found that my issue is similar to the Sending to authenticated queue However that thread doesn't really answered my question.
我发现我的问题类似于发送到经过身份验证的队列但是该线程并没有真正回答我的问题。
I have following setup (using .NET applications and MSMQ) 我有以下设置(使用.NET应用程序和MSMQ)
Note that everything works OK in above setup. 请注意,在上面的设置中一切正常。
However the issue starts when I enable the "Authenticated" checkbox for the private Queues PQ1 and PQ2 on its General tab . 但是,当我在其常规选项卡上启用专用队列PQ1和PQ2的“已验证”复选框时,问题就开始了 。 After this settings, the first application sends the MSMQ message to private queue but it ends up in "Transaction dead-letter messages" queue.
在此设置之后,第一个应用程序将MSMQ消息发送到专用队列,但它最终在“事务死信消息”队列中。 I tried adding Authenticated Users group to the Queue security tab and giving full access but it did not work.
我尝试将Authenticated Users组添加到Queue安全选项卡并提供完全访问权限,但它不起作用。
Further to this I also observed that the Sender tab on Property page of the message that goes to dead-letter queue reads Authenticated: No 除此之外,我还观察到去死信队列的消息的Property页面上的Sender选项卡读取Authenticated:No
Your help is highly appreciated to make the applications work with Authenticated Queue. 非常感谢您的帮助,使应用程序与Authenticated Queue一起使用。
After initializing a Message
object, set the UseAuthentication
property to true
. 初始化
Message
对象后,将UseAuthentication
属性设置为true
。
Example for sending a message to an authenticated queue: 将消息发送到经过身份验证的队列的示例:
private void SendToQueue(string queueMessage)
{
var message = new System.Messaging.Message(queueMessage);
message.UseDeadLetterQueue = true;
// This line resolved issue for sending message to queue with Authenticate checkbox checked.
message.UseAuthentication = true;
var queue = new System.Messaging.MessageQueue(@"FormatName:Direct=OS:.\private$\PQ1");
queue.Send(message, MessageQueueTransactionType.Single);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.