Search code examples
.netmsmq

How to purge MSMQ system queue journal programmatically on a workgroup installation?


I try this: MessageQueue mq = new MessageQueue(".\Journal$"); mq.Purge();

It work good on XP. But, on windows 2003 server, I always have this error : "A workgroup installation computer does not support the operation."


Solution

  • Try using format name like so:

    MessageQueue mq = new MessageQueue("DIRECT=OS:computername\SYSTEM$;JOURNAL");
    mq.Purge();
    

    I think that system queue can't be access by path. You have to use format name.

    look at Yoel Arnon's comment at the bottom of the page.