如何使用带有身份验证的HTTP使用c#将消息发送到MSMQ

时间:2016-04-15 13:06:51

标签: c# msmq

我正在研究MSMQ。我已经尝试使用Http向msmq发送消息。我可以使用HTTP向msmq发送消息。但我必须通过身份验证来限制用户。任何人都可以帮助我只允许特定用户单独向MSMQ发送消息。我已经尝试使用检查Authenticated Check框。但我无法发送消息。我试过了下面的代码。

MessageQueue TestQueue = new MessageQueue();
System.Messaging.Message mesg = new System.Messaging.Message();      
TestQueue.Path=@"FormatName:DIRECT=HTTP://IPAddress/msmq/private$/Test";
TestQueue.Formatter = new XmlMessageFormatter(new Type[] { typeof(string) });
mesg.Label = "1000";
mesg.UseAuthentication = true;
TestQueue.Send(mesg);
TestQueue.Close();

任何人都可以帮我安全地使用HTTP向msmq发送消息并进行身份验证吗?

0 个答案:

没有答案
相关问题