W
Wayne And Miles
I have created a server application that listens for connections using the
TCPListener class. When I connect to the server using a client on the same
machine as the server, all works as expected. However, when I attempt to
connect to the server application from a client on a remote machine on my
LAN, the connection is refused. I have used Ethereal to confirm that the
request from the client is being received on the server machine. I suspect
that this has something to do with socket or application permissions. Can
anyone point me in the correct direction?
My server application is created using VB.NET 2005 and runs on Windows XP
Home. My client application is running on a Windows XP Professional
machine.
The code to create the listening socket is as follows:
Dim sender As TcpListener = New TcpListener(IPAddress.Parse("127.0.0.1"),
_settings.ClientPort)
Try
sender.Start()
sender.BeginAcceptSocket(AddressOf SenderBeginAcceptEventHandler, sender)
Catch ex As SocketException
MessageBox.Show("Unable to accept connections on port " &
_settings.ClientPort & ".", "Web Proxy", MessageBoxButtons.OK,
MessageBoxIcon.Exclamation)
End Try
TCPListener class. When I connect to the server using a client on the same
machine as the server, all works as expected. However, when I attempt to
connect to the server application from a client on a remote machine on my
LAN, the connection is refused. I have used Ethereal to confirm that the
request from the client is being received on the server machine. I suspect
that this has something to do with socket or application permissions. Can
anyone point me in the correct direction?
My server application is created using VB.NET 2005 and runs on Windows XP
Home. My client application is running on a Windows XP Professional
machine.
The code to create the listening socket is as follows:
Dim sender As TcpListener = New TcpListener(IPAddress.Parse("127.0.0.1"),
_settings.ClientPort)
Try
sender.Start()
sender.BeginAcceptSocket(AddressOf SenderBeginAcceptEventHandler, sender)
Catch ex As SocketException
MessageBox.Show("Unable to accept connections on port " &
_settings.ClientPort & ".", "Web Proxy", MessageBoxButtons.OK,
MessageBoxIcon.Exclamation)
End Try