views:

49

answers:

1

Does anyone know of a decent way of diagnosing MSMQ access errors. I'm using NServiceBus in a web application. There is a service running that actually creates the private queues, and the web application sends messages to that queue.

The web site uses anonymous access, and the application pool runs using the Network Service account. When my application tries to send a message to the queue (using NServiceBus), I get MSMQ access denied errors. I have tried all combinations of full control with ANONYMOUS LOGON, Everyone, etc, and still no luck. I have tried deleting the queues and letting NServiceBus recreate them, and still no luck.

When I set the IIS App Pool to run using a local administrator account, then it all works fine. How can I work out exactly what permissions I need to apply? Using the accounts/permissions that are added by default clearly isn't working.

A: 

You need to set up the queue permissions so that "everyone" can send to any queue.

Udi Dahan
Udi, thanks for replying. NServiceBus is creating two queues (the main queue and the error queue), and on both queues "Everyone" has "Send Message" access allowed. Access is still denied when trying to send the message. I've subsequently found that this doesn't ALWAYS happen - on some of the dev machines we don't have an issue, on others it does. Do you know of any tools I can use to monitor who is trying to access the queue when access is being denied? I get the feeling it's an IIS authentication issue, because I haven't had this problem before - so it's certainly not NServiceBus.
Matt Salmon