title: RabbitMQ CreateConnection issues - works in one app but not in another
body: <p>So here is the connection code.</p>
  <pre><code>var factory = new ConnectionFactory
  {
      HostName = &quot;myserver&quot;,
      UserName = &quot;testuser&quot;,
      Password = &quot;testuserpassword&quot;
  };
  
  using (var connection = factory.CreateConnection())
   using (var channel = connection.CreateModel())
          {
              channel.QueueDeclare(queue: &quot;LOG&quot;,
                                   durable: false,
                                   exclusive: false,
                                   autoDelete: false,
                                   arguments: null);
  
              string message = &quot;Hello World!&quot;;
              var body = Encoding.UTF8.GetBytes(message);
  
              channel.BasicPublish(exchange: &quot;&quot;,
                                   routingKey: &quot;LOG&quot;,
                                   basicProperties: null,
                                   body: body);
              Console.WriteLine(&quot; [x] Sent {0}&quot;, message);
          }
  </code></pre>
  <p>I test this in a console app and everything works fine and I could send and receive messages.</p>
  <p>If i then copy and paste the same code from above into my WPF app, I get an exception here</p>
  <pre><code>connection = factory.CreateConnection()
  </code></pre>
  <p>Exception</p>
  <blockquote>
  <p>Exception thrown: 'System.ArgumentException' in RabbitMQ.Client.dll</p>
  <p>Additional information: No ip address could be resolved for myserver</p>
  </blockquote>
  <p>If I change &quot;myserver&quot; to the server ip I get the same error.
  Don't understand why the code works in one app and not the other.</p>