title: Problem with configuring and starting WCF service
body: <p>I have a problem with configuration and starting WCF service.
  In my application there is a method that starts service. Something like this</p>
  
  <pre><code>void Start(string protocol, string address, string port)
  {
      host = new ServiceHost(_myService,
          new Uri(String.Format("{0}://{1}{2}/Sample", protocol, address, port)));
      //...Some configuration (bindings, behaviors, etc.)
      host.Open();
  }
  </code></pre>
  
  <p>Let my computer has an IP 192.168.0.1. When I pass 'address' parameter with a value '192.168.0.2' an error occurred</p>
  
  <pre><code>"A TCP error (10049: The requested address is not valid in its context.)
   occurred while listening on IP Endpoint=192.168.0.2:1234"
  </code></pre>
  
  <p>That's right because it's not my IP. But after that if I pass correct value (my real IP) I get the same error about IP 192.168.0.2! So I can't reconfigure and restart server without restarting application.</p>
  
  <p>Why does it happen? How can I avoid such behavior?</p>