【发布时间】:2011-01-10 10:09:18
【问题描述】:
我使用 NetMsmq 绑定创建了一个 WCF 服务,为此我在我的机器上创建了一个私有队列并执行了项目。这样可以正常工作,并且我的 WCF 服务已启动并使用调试环境中的队列访问消息。现在,我想使用 windows 服务来托管服务,为此我还创建了一个新项目和 windows 安装程序(此服务在本地系统帐户下运行)。然后我尝试通过命令提示符使用 InstallUtil 命令安装此 Windows 服务。在安装过程中和服务主机打开期间,我收到一条异常消息:
There was an error opening the queue. Ensure that MSMQ is installed and running, the queue exists and has proper authorization to be read from. The inner exception may contain additional information.
Inner Exception System.ServiceModel.MsmqException: An error occurred while opening the queue:Access is denied. (-1072824283, 0xc00e0025). The message cannot be sent or received from the queue. Ensure that MSMQ is installed and running. Also ensure that the queue is available to open with the required access mode and authorization.
at System.ServiceModel.Channels.MsmqQueue.OpenQueue()
at System.ServiceModel.Channels.MsmqQueue.GetHandle()
at System.ServiceModel.Channels.MsmqQueue.SupportsAccessMode(String formatName, Int32 accessType, MsmqException& msmqException)
有人可以就上述问题提出可能的解决方案吗?我是否缺少为队列和 Windows 服务设置的任何权限,如果是这样,您能否建议在哪里添加这些权限?
【问题讨论】:
标签: windows-services msmq wcf