curtisdehaven
curtisdehaven

Reputation: 25

WCF / MSMQ / Permissions / Windows 10 & VS2019

I'm working with a legacy c# console application that uses WCF and MSMQ. It's several years old and was developed under VS2015 running in Windows 7. It runs fine in that environment.

But, when I simply copy the project to a Windows 10 machine running VS2019 and run the application in the VS2019 debugger I get the following exception when it attempts to queue a WCF/MSMQ message...

An error occurred while opening the queue:The queue does not exist or you do not have sufficient permissions to perform the operation. (-1072824317, 0xc00e0003). 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.

The queue does exist. In fact the app actually creates it if it's not there - which it did on 1st run.

Under Message Queuing the associated queue has full access granted to my user account.

MSMQ is installed. Again, the app itself created a queue.

I'm running VS2019 (and therefore the application under debug) "as an administrator" - which is another pain...

Again, this runs just fine in the older Windows 7 / VS2015 environment. It's only when the project is copied into the Windows 10 / VS2019 environment. Obviously there's some setting in the new environment...

Any thoughts?

Many thanks!
-- Curt

Upvotes: 0

Views: 258

Answers (1)

Ding Peng
Ding Peng

Reputation: 3964

This may be due to a problem with the base address in the configuration file. The server name needs to be included in the base address. If the server name of win7 and the server name of win10 are different, it may cause this problem. There are similar questions in this blog, you can refer to it.

enter image description here

For more information about "Message Queuing to Windows Communication Foundation", you can refer to this link:

https://learn.microsoft.com/en-us/dotnet/framework/wcf/samples/message-queuing-to-wcf

Upvotes: 0

Related Questions