如何在工作组安装上以编程方式清除MSMQ系统队列日志? [英] How to purge MSMQ system queue journal programmatically on a workgroup installation?

查看:82
本文介绍了如何在工作组安装上以编程方式清除MSMQ系统队列日志?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试这样: MessageQueue mq =新的MessageQueue(.\ Journal $"); mq.Purge();

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

在XP上运行良好. 但是,在Windows 2003 Server上,我始终会遇到此错误: 工作组安装计算机不支持该操作."

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

推荐答案

尝试使用格式名称,如下所示:

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.

看看Yoel Arnon的在页面底部发表评论.

这篇关于如何在工作组安装上以编程方式清除MSMQ系统队列日志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆