Troubleshooting Exceptions: System.Messaging.MessageQueueException
Aexception is thrown if a Microsoft Message Queuing internal error occurs.
- Check the MessageQueueErrorCode property of the exception to determine why the MessageQueue operation failed.
Exceptions associated with the MessageQueueException class are generated by internal errors within Message Queueing that should be dealt with programmatically. Every exception consists of an error code and a text string that describes the source. For a list of these error codes and their descriptions, see.
If a sharedModeDenyReceive parameter set to true, any MessageQueue that subsequently tries to read from the queue generates a MessageQueueException exception because of a sharing violation. The same exception is thrown if a MessageQueue tries to access the queue in exclusive mode while another MessageQueue already has nonexclusive access to the queue.opens a queue with the
|Visual Basic Note|
is threading-apartment–aware. Visual Basic sets the state of the main thread to STA, so you must apply the in the Main subroutine. Otherwise, sending a transactional message using another thread throws a MessageQueueException exception.