【问题标题】:MSMQ Access issue in NServiceBus with asp.net web service使用 asp.net Web 服务的 NServiceBus 中的 MSMQ 访问问题
【发布时间】:2009-12-08 16:52:49
【问题描述】:

我正在尝试在我的 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

【问题讨论】:

    标签: c# asp.net msmq nservicebus


    【解决方案1】:

    这很可能是一个安全问题,请确保授予每个人对所涉及队列的完全权限

    希望这会有所帮助!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-12-09
      • 2014-11-14
      • 2011-03-09
      • 2014-12-07
      • 2010-10-18
      • 1970-01-01
      • 1970-01-01
      • 2011-03-19
      相关资源
      最近更新 更多