title: SSL Support for Rabbit + .Net + Windows
body: <p>i have been trying to establish a ssl support for my rabbitMQ application, i have followed the rabbitmq documentation <a href="http://www.rabbitmq.com/ssl.html#enabling-ssl" rel="nofollow">link</a> to include ssl support in my .net application for rabbit, i have been able to successfully create certificates for the ssl authentication and created a config file for rabbit and placed it within the appdata folder inside rabbitMQ folder the code for the config file :</p>
  
  <pre><code>[
   {rabbit, [
   {ssl_listeners, [5671]},
   {ssl_options, [{cacertfile,"C:\testca\cacert.cer"},
                  {certfile,"C:\server\cert.pem"},
                  {keyfile,"C:\server\key.pem"},
                  {verify,verify_peer},
                  {fail_if_no_peer_cert,false}]}
   ]}
   ]
  </code></pre>
  
  <p>i have modified my c# code of rabbitMQ like this for the publisher:</p>
  
  <pre><code>        ConnectionFactory factory = new ConnectionFactory();
          factory.Ssl.ServerName = System.Net.Dns.GetHostName();
          factory.Ssl.CertPath = "C:\\server\\keycert.p12";
          factory.Ssl.CertPassphrase = "password";
          factory.Ssl.Enabled = true;
  </code></pre>
  
  <p>but am getting an error : BrokerUnreachableException was unhadled.</p>
  
  <p>any tips or help? any minute thing am missing let me know ?</p>
  
  <p>am using RabbitMQ:2.51.
  Erlang: R14B01
  OS: Windows and on .net client.</p>
  
  <p>StackTrace:</p>
  
  <pre><code>Exception Message: None of the specified endpoints were reachable
  
  Source: RabbitMQ.Client   
  
  Stacktrace: at RabbitMQ.Client.ConnectionFactory.CreateConnection(Int32 maxRedirects)
                 at RabbitMQ.Client.ConnectionFactory.CreateConnection()
                 at RabbitProducer.Program.Main(String[] args) in C:\Users\pc 1\Documents\Visual Studio 2008\Projects\RabbitProducer\RabbitProducer\Program.cs:line 36
  </code></pre>
  
  <p>Broker Log:</p>
  
  <pre><code>=INFO REPORT==== 9-Aug-2011::11:39:05 ===
  Limiting to approx 924 file handles (829 sockets)
  
  =INFO REPORT==== 9-Aug-2011::11:39:05 ===
  Memory limit set to 804MB.
  
  =INFO REPORT==== 9-Aug-2011::11:39:05 ===
  msg_store_transient: using rabbit_msg_store_ets_index to provide index
  
  =INFO REPORT==== 9-Aug-2011::11:39:05 ===
  msg_store_persistent: using rabbit_msg_store_ets_index to provide index
  
  =INFO REPORT==== 9-Aug-2011::11:39:05 ===
  started TCP Listener on [::]:5672
  
  =INFO REPORT==== 9-Aug-2011::11:39:05 ===
  started TCP Listener on 0.0.0.0:5672
  </code></pre>