MSMQ Exception at the time of SetPermission RRS feed

  • Question

  • Hi,

    I am getting msmq exception during SetPermission call. I am using private queue.
    I have a windows service to process messages from the queue.

    Following is the logic:

    if queue exist the initialize new instance of queue
    else create new queue

    Grant Full control to "EveryOne" by calling SetPermission.

    Peek for message with some timeout value.
    If peek timeout then continue;
    else process all messages and continue

    As per the logic SetPermission is called is called every time after processing all the messages in while loop.
    Sometime I am getting following error in log file. This is not happening always.
    3-4 times in a day.
    Can anyone help me to identify the root cause?  

    System.Messaging.MessageQueueException (0x80004005)
       場所 System.Messaging.MessageQueue.SetPermissions(AccessControlList dacl)
       場所 System.Messaging.MessageQueue.SetPermissions(String user, MessageQueueAccessRights rights, AccessControlEntryType entryType)
       場所 System.Messaging.MessageQueue.SetPermissions(String user, MessageQueueAccessRights rights)


    Monday, May 27, 2019 3:21 AM