Apologies if this could have been asked before. We hve tried this link from StackOverflow and didn't work for us either Bad Request - Invalid Hostname when accessing localhost Web API or Web App from across LAN.
We have a .net core 2.0 web api configured in one of the laptops with the following ip address:
and running on windows 10, and Visual Studio 2017
We have modified the applicationsHost config file as well for the project and added the IPAddress of the machine with the correct port on the bindings
We run the following commands too netsh https add urlacl url=http://192.168.43.192:51785/ user=everyone netsh advfirewall firewall add rule name="IISExpressWeb" dir=in protocol=tcp localport=51785 profile=private remoteip=localsubnet action=allow
We have included the said ports as well on the firewall rules (inboud/outbound):
The problem is that when we access the web api from a different machine on the network (different ip address, can be a Mac or a mobile device either via port 44350, ssl, or port 51785) it always return an error
Thanks in advance for the help.
I'm currently working on the road and using my phone (on the picture above as the router hence no wifi connection icon on the android). It works the same on my mac which is connected to the android phone's wifi as well. Also, I get the same if I'm using a fixed router at home.
We even tried to download Conveyor from here https://marketplace.visualstudio.com/items?itemName=vs-publisher-1448185.ConveyorbyKeyoti