Hello sushant kora,
thank you for posting on the Microsoft Community Forums.
In this case, the reason why no exception is thrown may be related to the working mechanism and permission configuration of MSMQ (Microsoft Message Queuing). Here are some of the reasons and checkpoints that can lead to this behavior:
- Caching of Message Queuing: In some cases, MSMQ clients may cache permission and configuration information for queues. If the MSMQ service is not refreshed or restarted after modifying the permission settings, the client may still be using the old permission configuration.
- Local Queue vs Remote Queue: Confirm that you are operating with a remote queue and not a local queue. In the case of a local queue, permission setting changes do not affect the operation.
- Queue Permissions Active: Ensure that the permission changes have been successfully applied and saved. In some cases, permission changes may not be successfully committed, resulting in new permissions not taking effect.
- MSMQ Safe Mode: Check the MSMQ Safe Mode settings. If MSMQ is in "insecure mode", it may not check for certain permission settings.
- User Account and Process Permissions: Confirm that the user account and process running the client application have the appropriate permissions, and possibly some advanced permissions allow the queue to be manipulated without being limited to the queue's permission settings.
- Service & Firewall Rules: Confirm that MSMQ service and firewall rules are configured correctly, these may also affect messaging but do not trigger the expected exception.
- Message Acknowledgment and Queue Monitoring: Use the Message Acknowledgment (ACK/NACK) mechanism to check the actual processing result of the message. Even if the method is successfully called, it may be discarded or unprocessed when it is actually sent. This mechanism can be used to catch potential sending failures.
To investigate this issue further, you can try the following steps:
- Refresh or Restart MSMQ Service: Make sure that the MSMQ service has been refreshed or restarted after the permission modification.
- Logs & Event Viewer: Check the MSMQ-related logs in the Event Viewer for possible anomalies or warnings.
- Permission Verification Tool: Use a tool or write a test program to explicitly verify the current queue permission configuration to ensure that the operation permission is indeed removed.
- Test with different accounts: Try accessing the queue with different user accounts to see if a specific account has special permissions.
Hope it helps.
Best regards,
Lei