简体   繁体   中英

MSMQ Failed to create an Queue

Im trying to pull messages from a queue of the MSMQ service. It works great in one service but in the other it fails to create a queue if it not exists. the line that fails is:

_cursor = _queue.CreateCursor();

Where CreateCursor is a method of the MessageQueue class. The exception is:

Message Queue service is not available

If you need more information let me know. Thanks in advance.

The problem was that I ran the service in debug mode. When I compiled it and ran in Release mode the problem solved. It seems that queues' creation permission depends on the compilation type of the solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM