0

I have a private message queue and when I want to read its messages I get a access denied error and it crashes. Previously for learning purposes I had written two separate applications, put a button on each of them, press the button on this one, create a queue and put a message in it, now click on the button on the other one, read the message and show it! And it was Working So I copy pasted THE SAME code to my real project and getting this Accss Denied Error...THE ONLY DIFFERENCE is that in my real project the message sender is inside the OnCreated event of a FileSystemWatcher which is running as a Windows Service...but does it make a difference?

I can copy paste the code too but like I said code is Working fine in my sample project and I have copy pasted the exact same code for my real project. So I have no clue what is wrong. Any ideas?

UPDATE: Now I also noticed that I cannot even DELETE it by going to Control Panel and trying to delete it, again getting "Access Denied" error.

5
  • "Access Denied " is usually pretty specific.... Jun 19, 2012 at 3:58
  • @MitchWheat : what do you mean? what is next? Now I also noticed that I cannot even DELETE it by going to Control Panel and trying to delete it, again getting "Access Denied" error.
    – Bohn
    Jun 19, 2012 at 3:59
  • 2
    The service is more than likely running under the system user or the network service user and your app is running with your privileges. Jun 19, 2012 at 4:04
  • @RogerStewart : Hmmm..That makes sense ...What do you think I should do then? I right click on my app.exe and said Run As Admin but didn't help... plus I can't even delete it manually from Control Panel.
    – Bohn
    Jun 19, 2012 at 4:12
  • 1
    Check the security settings on the queue. If you cannot add the relevant account (probably your own) then you will need to log into the machine using the account that created the queue and then add the required security. Part of the setup/creation of queues should be to apply the relevant security. HTH
    – Eben Roux
    Jun 19, 2012 at 4:14

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.