I created the WCF service using the NetMsmq binding, for which I created a private queue on my machine and completed the project. This works fine as such, and my WCF service starts up and accesses the message using a queue in the debugging environment. Now I wanted to host the service using the Windows service, and for it I also created a new project and Windows installer (this service runs under the Local System account). Then I tried to install this Windows service using the InstallUtil command on the command line. When the installation occurs and during the opening of the service host, I get an exception:
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)
Can anyone suggest a possible solution to the above problem? Are there any permissions for the queue, as well as Windows services, if you could suggest where these permissions should be added?
wcf msmq windows-services
Sowmya
source share