On an XP machine there is a private messagequeue that was created by a .net service. When I want to access this private queue in a VB6 application I keep getting an \"Access is
The solution posted here seems a bit of a hack. Perhaps this is necessary for Windows XP. I've encountered something similar using Windows 7 and used a different approach to solve this.
Situation:
Solution (this is for Windows 7):
Now you can access the messages in the queue and also purge the queue if you would like to.
This can happen if the .NET Service removed the "Everyone" group from the permissions the private queue. Here are some steps you can take to resolve this:
Stop the MSMQ Service
Open the folder C:\WINDOWS\system32\msmq\storage\lqs
Find the file in this folder that describes your queue -- (incommingQueue)
Using notepad, open the lqs file for some other private queue that has good security permissions. (If you don't have any other private queues create one)
Locate the line in the file that begins Security=....
Copy the whole line to your clipboard (watch out for Word Wrap, this line will be quite long)
Open the lqs file for your problem queue in your text editor
Overwrite the Security=...
line in this file with the contents of your clipboard
Save the modified lqs file
Start the MSMQ service
You should find that the problem queue now has the same permissions as the queue whose security settings you copied at step 6 above.