T
theblacksnake
Guest
Hi all, I am building a client and a server that communicate over the network using the HTTP protocol. My problem is, that even though I add the prefix http://*:98/ to the server app, the client can only connect when it is executed from the localhost. I have already disabled the firewall software, and still the connection fails by saying that the server failed to respond.
The code I am using is the following. The server app runs with admin privileges.
Server:
Dim Listener As System.Net.HttpListener = New System.Net.HttpListener()
Listener.Prefixes.Add("http://*:" & Port & "/")
Listener.Prefixes.Add("http://+:" & Port & "/")
Application.DoEvents()
Listener.Start()
client:
Dim request As WebRequest = WebRequest.Create("http://" & ServerAddress & ":" & port & "/")
request.Method = "POST"
request.ContentType = "application/x-www-form-urlencoded"
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(data, 0, data.Length)
dataStream.Close()
Is there anything I am doing wrong ? Thanks in advance
Continue reading...
The code I am using is the following. The server app runs with admin privileges.
Server:
Dim Listener As System.Net.HttpListener = New System.Net.HttpListener()
Listener.Prefixes.Add("http://*:" & Port & "/")
Listener.Prefixes.Add("http://+:" & Port & "/")
Application.DoEvents()
Listener.Start()
client:
Dim request As WebRequest = WebRequest.Create("http://" & ServerAddress & ":" & port & "/")
request.Method = "POST"
request.ContentType = "application/x-www-form-urlencoded"
Dim dataStream As Stream = request.GetRequestStream()
dataStream.Write(data, 0, data.Length)
dataStream.Close()
Is there anything I am doing wrong ? Thanks in advance
Continue reading...