title: Loopback connection always refused in C#
body: <p>I've just spent two days on this. This is run in the game engine Unity3D, but that shouldn't make a difference. These two lines ALWAYS fail:</p>
  
  <pre><code>TcpClient client = new TcpClient();
  client.Connect(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 15219));
  </code></pre>
  
  <p>The error I get is:</p>
  
  <pre><code>System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it.
  
    at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP, Boolean requireSocketPolicy) [0x00000] in &lt;filename unknown&gt;:0 
    at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x00000] in &lt;filename unknown&gt;:0 
    at System.Net.Sockets.TcpClient.Connect (System.Net.IPEndPoint remote_end_point) [0x00000] in &lt;filename unknown&gt;:0 
    at StreamIn.Connect (System.String server, System.String message) [0x00011] in C:\XXX\StreamIn.cs:41 
  UnityEngine.Debug:Log(Object)
  StreamIn:uPrint(String) (at Assets/StreamIn.cs:27)
  StreamIn:Connect(String, String) (at Assets/StreamIn.cs:77)
  StreamIn:Start() (at Assets/StreamIn.cs:18)
  </code></pre>
  
  <p>I've tried everything, including changing my firewall settings and disabling the firewall.</p>
  
  <p>I get the same error with a dummy IP address.</p>
  
  <p>If I try port <code>80</code> instead of <code>15219</code>, the Unity editor freezes. (I do have a web server running.)</p>
  
  <p>Am I missing something obvious? Or not obvious?</p>