title: TcpClient can't connect To TcpListener
body: <p>i want to use a TcpListener - TcpClient connection inside Network.
  It is only working when i start the application both on one device, when i use 2 different devices in Network there is this Error:</p>
  
  <pre><code>A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
  Exception: System.Net.Sockets.SocketException (0x80004005): Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte 127.0.0.1:1300
  bei System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
  bei System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
   bei System.Net.Sockets.TcpClient.Connect(IPEndPoint remoteEP)`bei System.Net.Sockets.TcpClient.Connect(IPAddress address, Int32 port)`
  </code></pre>
  
  <p>I thought this is because of Windows Firewall but even when i deactivate the Firewall, the Problem exists.</p>
  
  <p>Server:</p>
  
  <pre><code> ipAddress = Dns.GetHostEntry("localhost").AddressList[1];
                      server = new TcpListener(IPAddress.Any, port);
                      server.Start();
  
                      clients = new List&lt;TcpClient&gt;();
  
                      Console.WriteLine("Starte Server ..." + ipAddress + " : " + port);
  
                      receiver = new List&lt;TCPReceiveMessages&gt;();
  </code></pre>
  
  <p>How i Accept Client:</p>
  
  <pre><code>  clientAccepter = new Thread(this.accpeting);                
                clientAccepter.Start();
  </code></pre>
  
  <p>and the Thread inside: </p>
  
  <pre><code>private void accpeting()
      {
          //Client socket erstellen
          socketForClient = server.AcceptSocket();
  
          while (accept)
          {
              //clients werden hinzugefügt
              clients.Add(server.AcceptTcpClient());
              receiver.Add(new TCPReceiveMessages(this));
         }
  
          socketForClient.Close();
          model.getController().setLoading(false, " ");
      }
  </code></pre>
  
  <p>And well the Client is Connecting to the correct ipAdress and port.</p>
  
  <p>I hope anyone can help me :)</p>
  
  <p>Edit 1: I changed the Ip Adress to 192.168.1.3, because it is inside network, now the TcpClient says that the Server is not reacting after a time span or the connect had troubles because the connected Host didn't react.</p>