使用 asp.net Web 服务的 NServiceBus 中的 MSMQ 访问问题
我正在尝试在我的 asp.net (wcf) Web 服务项目中实现发布者-订阅。当我尝试在 global.asax 中创建总线
protected void Application_Start(object sender, EventArgs e)
{
try
{
log4net.Config.XmlConfigurator.Configure();
Bus = NServiceBus.Configure.WithWeb()
.SpringBuilder()
.BinarySerializer()
.MsmqTransport()
.IsTransactional(false)
.PurgeOnStartup(false)
.UnicastBus()
.ImpersonateSender(false)
.CreateBus()
.Start();
}
catch (Exception ex)
{
log.Error(ex);
}
}
public static IBus Bus { get; private set; }
但它没有创建总线时..然后它抛出异常
Exception reached top level.
System.Messaging.MessageQueueException: Access to Message Queuing system is denied.
at System.Messaging.MessageQueue.MQCacheableInfo.get_ReadHandle()
at System.Messaging.MessageQueue.StaleSafeReceiveMessage(UInt32 timeout, Int32 action, MQPROPS properties, NativeOverlapped* overlapped, ReceiveCallback receiveCallback, CursorHandle cursorHandle, IntPtr transaction)
at System.Messaging.MessageQueue.ReceiveCurrent(TimeSpan timeout, Int32 action, CursorHandle cursor, MessagePropertyFilter filter, MessageQueueTransaction internalTransaction, MessageQueueTransactionType transactionType)
at System.Messaging.MessageQueue.Peek(TimeSpan timeout)
at NServiceBus.Unicast.Transport.Msmq.MsmqTransport.Receive()
at NServiceBus.Utils.WorkerThread.Loop()
我怎样才能避免这种情况?.... ....我在中间感到震惊...
nRk
I am trying to implement publisher - subscribe in my project of asp.net (wcf) web services. When i am trying to create bus in global.asax
protected void Application_Start(object sender, EventArgs e)
{
try
{
log4net.Config.XmlConfigurator.Configure();
Bus = NServiceBus.Configure.WithWeb()
.SpringBuilder()
.BinarySerializer()
.MsmqTransport()
.IsTransactional(false)
.PurgeOnStartup(false)
.UnicastBus()
.ImpersonateSender(false)
.CreateBus()
.Start();
}
catch (Exception ex)
{
log.Error(ex);
}
}
public static IBus Bus { get; private set; }
but it is not creating bus.. then it is throwing exception
Exception reached top level.
System.Messaging.MessageQueueException: Access to Message Queuing system is denied.
at System.Messaging.MessageQueue.MQCacheableInfo.get_ReadHandle()
at System.Messaging.MessageQueue.StaleSafeReceiveMessage(UInt32 timeout, Int32 action, MQPROPS properties, NativeOverlapped* overlapped, ReceiveCallback receiveCallback, CursorHandle cursorHandle, IntPtr transaction)
at System.Messaging.MessageQueue.ReceiveCurrent(TimeSpan timeout, Int32 action, CursorHandle cursor, MessagePropertyFilter filter, MessageQueueTransaction internalTransaction, MessageQueueTransactionType transactionType)
at System.Messaging.MessageQueue.Peek(TimeSpan timeout)
at NServiceBus.Unicast.Transport.Msmq.MsmqTransport.Receive()
at NServiceBus.Utils.WorkerThread.Loop()
How Can I Avoid this?.... .... I am struck in the middle...
nRk
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这很可能是一个安全问题,请确保授予每个人对所涉及队列的完整权限,
希望这会有所帮助!
This is most likely a security issue, make sure to give everyone full rights to the queues involved
hope this helps!