title: Cannot read from MSMQ on local machine
body: <p>I have a public message queue on my local machine that I created with my user account. I have a Windows service also on my local machine that runs under a corporate service account. I have granted the service account full access to the queue, and yet when the service is running, it can't seem to read the messages on the queue. I feel like I'm missing something rather basic, but I haven't been able to figure out what it is.</p>
  
  <p>Code:</p>
  
  <pre><code>string queuePath = "FormatName:DIRECT=TCP:127.0.0.1\MyQueue";
  MessageQueue _queue = new MessageQueue(queuePath);
  </code></pre>
  
  <p>When I step through the code, after the _queue object is created, the CanRead property is always false. I've tried several different ways of setting the queue path ("DIRECT=OS:.\MyQueue", "PUBLIC=[guid]", and without using a format name as well), but nothing has been successful.</p>
  
  <p>The <a href="http://msdn.microsoft.com/en-us/library/system.messaging.messagequeue.canread.aspx" rel="nofollow">MSDN documentation</a> states that "CanRead is false if a queue is already open with exclusive read access (or if it's open with non-exclusive access and this MessageQueue requests exclusive access), or if the application does not have sufficient rights to access it."</p>
  
  <p>I've made sure that the application has sufficient rights (I think), but how can I tell if something else has "exclusive read access" to it? Is there anything else I'm missing?</p>
  
  <p>Thanks.</p>