Accessing Localhost Port Over a Local Network

ip addresslocalhostportweb services

Both localhost and 192.168.0.199 both resolve to the same page in my web browser (they both redirect to localhost/xampp/ and 192.168.0.199/xampp/ respectively).

But when I try not to access my web service, localhost:49973/BaseballWebService/Service.asmx/ resolves the web service and 192.168.0.199:49973/BaseballWebService/Service.asmx/ cannot find the webservice.

I have to access my web service using my computers ip instead of localhost because I have to access the we service remotely over a local network. Anyone have an idea what could be going wrong?

Best Answer

Make sure that you aren't using 2 sites instead of 1. It's possible that you have 2 different sites that both have a /xampp folder but don't both have the BaseballWebService folder.

If a single site has both localhost (or 127.0.0.1) and 129.168.0.199 bindings then it must be something causing a redirect in the BaseballWebService folder. A good test is to create a test.txt or test.htm page and place it in your BaseballWebService folder to confirm that IIS is serving up that file correctly without redirecting.

I'm assuming that you're using IIS since you've tagged this as IIS.