title: WCF Can't Open MSMQ Queue: Access is Denied
body: <p>We have a Windows Service which uses WCF to reads messages from an MSMQ queue.  Recently, the service won't start because it can't open the queue:</p>
  
  <pre><code>Running WcfHost, service contract IWcfService.  :
  System.InvalidOperationException: 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. ---&gt;
   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&amp; msmqException)
     --- End of inner exception stack trace ---
     at System.ServiceModel.Channels.MsmqVerifier.VerifyReceiver(MsmqReceiveParameters receiveParameters, Uri listenUri)
     at System.ServiceModel.Channels.MsmqTransportBindingElement.BuildChannelListener[TChannel](BindingContext context)
     at System.ServiceModel.Channels.Binding.BuildChannelListener[TChannel](Uri listenUriBaseAddress, String listenUriRelativeAddress, ListenUriMode listenUriMode, BindingParameterCollection parameters)
     at System.ServiceModel.Description.DispatcherBuilder.MaybeCreateListener(Boolean actuallyCreate, Type[] supportedChannels, Binding binding, BindingParameterCollection parameters, Uri listenUriBaseAddress, String listenUriRelativeAddress, ListenUriMode listenUriMode, ServiceThrottle throttle, IChannelListener&amp; result, Boolean supportContextSession)
     at System.ServiceModel.Description.DispatcherBuilder.BuildChannelListener(StuffPerListenUriInfo stuff, ServiceHostBase serviceHost, Uri listenUri, ListenUriMode listenUriMode, Boolean supportContextSession, IChannelListener&amp; result)
     at System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription description, ServiceHostBase serviceHost)
     at System.ServiceModel.ServiceHostBase.InitializeRuntime()
     at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
     at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
     at WcfHost`2.Open() 
  </code></pre>
  
  <p>We've double-checked the queue's permissions and they haven't changed.  We've run <a href="http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx" rel="nofollow">ProcMon</a> and aren't seeing any access denied events.  We don't know what changed to cause this error.  </p>
  
  <p><strong>Why can't WCF open this queue?</strong></p>