-1

I have a server written on C++ REST SDK.

There's http_listener which listens to "http://localhost:34568".

When I try to send a request in browser or from the client to localhost it works fine and I get the responses from my server. But the point is to use the application in network. And here where the problem comes.

When I try to request the server from the other PC using IP(192.168.1.103:34568) I get "HTTP Error 400. The request hostname is invalid."

I'm aware that that could be some firewall issues but it's turned off. Also I tried to set port rules in brandmauer and it didn't help.

And even more! I got XAMPP running Apache server and when I do the same thing but with (192.168.1.103:80) I do get the response from Apache and have an access.

Anybody had something similar or somebody knows what the problem is about?

pnuts
  • 58,317
  • 11
  • 87
  • 139
Nikita
  • 1
  • 1
    In case of somebody meeting the same problem I've got a solution! Just replace 'localhost' with '*' – Nikita Nov 20 '15 at 12:20

1 Answers1

1

Listen to local ip address or to your network name (dns): "http://xxx.xxx.xxx.xxx:34568" or "http://your_network_name:34568" So, if you have multiple network adapters, you can choose which one.

LaraTv
  • 11
  • 1