Calling a web service from another machine

here is my question: I need to call a web service hosted on HostA from a web browser on HostB. I am creating a web service on HostA, I started it with F5 and this is the local url:

http://localhost:55432/Service1.svc

      

In HostB I used the same url as localhost with HostA's IP (pingable). But that won't work. The page returns a"Unable To Connect to IP-Address".

I don't think this is a code issue, but it looks like a connection / security issue. Thanks for the help.

+3


source to share


1 answer


By default, Visual Studio web servers (Cassini for older implementations, IIS express for newer implementations) don't even bind to your network adapter IP address, but only bind it to localhost. Thus, by default, they do not accept remote connections.

If you are using Cassini, can you refer to how to access the cassini server remotely on your local network for a demonstration? for more information.



IIS express is handled differently, as evidenced by IIS Express allowing an external request .

+2


source







All Articles