title: Creating a private MSMQ queue in a Microsoft Cluster via a script
body: <p>We are migrating to Windows 2008 R2 Standard and will be using a Microsoft Clustering (active-passive) configuration.  Our application is heavily dependent on MSMQ private queues and our install creates well over 100 private queues using the following C# code.</p>
  
  <p>MessageQueue.Create(".\private$\myqueue", false);</p>
  
  <p>Since the install is not running inside the context of the cluster, the queues are created on the local node and not in the cluster.</p>
  
  <p>We then tried changing the code to:</p>
  
  <p>MessageQueue.Create("MYCLUSTERNAME\private$\myqueue", false);</p>
  
  <p>However, you can't create private queues on a different server (in this case the cluster server context) and you receive the error "Invalid queue path name".</p>
  
  <p>My two questions are:
  1) Is there a way I can run the install in the cluster's context so that when creating a private queue, it would actually be creating the queue in the cluster?</p>
  
  <p>2) If not, what's the best approach on creating queues in the cluster via .NET?  I've read some blogs where people create a middle-man Windows service that resides inside the cluster and then their install uses interprocess communication to tell the service which queues to create.  That seems like a hack, but is doable if that turns out to be the only approach.</p>