为什么 MSMQ 认为我在工作组计算机上?

发布于 2024-11-06 08:50:41 字数 199 浏览 2 评论 0原文

我的计算机已连接到域,但是当我去创建公共队列时:

MessageQueue.Create(@".\testqueue");

我收到此错误:

工作组安装计算机可以 不支持该操作。

为什么 MSMQ 会认为我在工作组计算机上?

My computer is connected to a domain, but when I go to create a public queue:

MessageQueue.Create(@".\testqueue");

I get this error:

A workgroup installation computer does
not support the operation.

Why might MSMQ think I'm on a workgroup computer?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

ぺ禁宫浮华殁 2024-11-13 08:50:41

我知道这已经晚了,并且已经有一个可接受的答案,但我刚刚遇到了这个问题,并通过更改队列字符串的格式解决了这个问题。

当我的队列名称是这样时,我收到工作组错误:

".\QueueName"

当我将其更改为更正式的版本时,没有错误并且发送到队列有效:

"FormatName:DIRECT=OS:ComputerName\private$\QueueName"

以防万一其他人遇到这篇文章,现在他们还有其他事情要做尝试...

I know this is late, and there is already an accepted answer, but I just had this issue and it was resolved by changing the format of the queue string.

When my queue name was this, I got the workgroup error:

".\QueueName"

When I changed it to a more formal version, there was no error and sending to the queue worked:

"FormatName:DIRECT=OS:ComputerName\private$\QueueName"

Just in case someone else comes across this post, now they have something else to try...

罪歌 2024-11-13 08:50:41

我遇到了同样的问题并通过将其更改为 @".\private$\QueueName" 解决了它

I got the same problem and solved it by changing it to @".\private$\QueueName"

风为裳 2024-11-13 08:50:41

成为域的一部分是在 AD 集成模式下安装 MSMQ 的前提。
它不保证 MSMQ 以 AD 集成模式安装。
如果出现以下情况,MSMQ 将在工作组模式下安装:

  1. 未选择 AD 集成作为安装选项 选择
  2. AD 集成但初始化失败;检查事件日志

是的,工作组名称在域成员情况下会令人困惑。

Being part of a domain is a pre-cursor for installing MSMQ in AD-integrated mode.
It doesn't guarantee MSMQ IS installed in AD-integrated mode.
MSMQ will install in workgroup mode if:

  1. AD integration was not selected as a setup option
  2. AD integration was selected but failed to initialise; check event logs

Yes, the workgroup name is confusing in a domain member situation.

情话已封尘 2024-11-13 08:50:41

我遇到了同样的问题,看看下面的解决方案。我不知道原因,但以这种方式创建队列效果很好。

private MessageQueue messageQueue;
public const string DEFAULT_QUEUE_NAME = "newQueue";
public const string QUEUENAME_PREFIX = ".\\Private$\\";

public static string QueueName
{
    get
    {
        string result = string.Format("{0}{1}", QUEUENAME_PREFIX, DEFAULT_QUEUE_NAME);
        return result;
    }
}

public void SendMessage()
{
    string queuePath = QueueName;
    MessageQueue  messageQueue = MessageQueue.Create(queuePath);
    messageQueue.Send("msg");            
}

您可以以相同的方式创建接收消息的队列。

I was facing the same problem, take a look at solution below. I don't know the reason but creating queue in this manner works perfectly.

private MessageQueue messageQueue;
public const string DEFAULT_QUEUE_NAME = "newQueue";
public const string QUEUENAME_PREFIX = ".\\Private$\\";

public static string QueueName
{
    get
    {
        string result = string.Format("{0}{1}", QUEUENAME_PREFIX, DEFAULT_QUEUE_NAME);
        return result;
    }
}

public void SendMessage()
{
    string queuePath = QueueName;
    MessageQueue  messageQueue = MessageQueue.Create(queuePath);
    messageQueue.Send("msg");            
}

you can create queue for receiving message in the same manner.

夏日落 2024-11-13 08:50:41

出于文档目的添加...我在尝试访问事务死信队列时收到错误“工作组安装计算机不支持该操作”,这是由于未指定计算机名称。我使用句点来表示计算机名称。例如“FORMATNAME:DIRECT=OS:.\SYSTEM$;DEADXACT”。即使使用完整的格式名称也不起作用。将句点替换为计算机名称后问题解决。下面是工作代码。

using (var queue = new MessageQueue($@"FORMATNAME:DIRECT=OS:{Environment.MachineName}\SYSTEM$;DEADXACT"))
{
    queue.Purge();
}

Adding for documentation purpose... I was getting error "A workgroup installation computer does not support the operation" while trying to access transactional dead letter queue and it was due to not specifying the machine name. I was using period to denote computer name. e.g. "FORMATNAME:DIRECT=OS:.\SYSTEM$;DEADXACT". It does not work even with using complete format name. Problem solved after replacing the period with computer name. Below is the working code.

using (var queue = new MessageQueue($@"FORMATNAME:DIRECT=OS:{Environment.MachineName}\SYSTEM$;DEADXACT"))
{
    queue.Purge();
}
第几種人 2024-11-13 08:50:41

MSMQ 可能作为来宾用户或其他用户安装在您的计算机中,因此将其从计算机中删除并使用管理权限进行安装。

MSMQ 配置

It is possible that MSMQ installed in your machine as a guest user or another user so remove it from machine and install it with administrative permission.

MSMQ configuration

电影里的梦 2024-11-13 08:50:41

在服务器上,我在运行 MSMQ 时遇到问题并收到不同类型的错误,包括问题中提出的错误。

工作组安装计算机不支持该操作

对我有用的不是摆弄服务器管理器,而是使用 Powershell 重新安装 MSMQ。

删除-WindowsFeature Msmq; Add-WindowsFeature MsMq

这两个 cmdlet 可以在以管理员身份运行的 Powershell 控制台中运行。至少它为我修复了错误,但这将安装整个 Msmq 功能,包括子功能。

Powershell -重新安装 MSMQ

On the server I was having trouble running MSMQ and getting different kinds of errors, including the error asked in the question.

A workgroup installation computer does not support the operation

What worked for me was not fiddling with Server Manager, but reinstalling MSMQ using Powershell.

Remove-WindowsFeature Msmq; Add-WindowsFeature MsMq

These two cmdlets can be run in a Powershell console running as Administrator. At least it fixed the error for me, but this will install the entire Msmq feature, including subfeatures.

Powershell - reinstalling MSMQ

蹲在坟头点根烟 2024-11-13 08:50:41

我在 Visual Studio (2015) 调试网站时遇到此错误。
重新启动iisexpress解决了这个问题...

i got this error while debugging a web site from visual studio (2015).
restarting the iisexpress solved this...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文