How to test WebService from remote machine on Local network?
-
I created ASP.NET webservice in VS2010 with 2 simple methods: I can test it locally(IP= 192.168.1.104) with http://localhost:4070/Service1.asmx, The localhost = 127.0.0.1 and not the local IP. I go to my other machine on my network, I type in 192.168.1.104:4070/Service1.asmx to try to get at the webservice, and I get the error could not connect to '192.168.1.104:4070'. Am I doing this wrong? How do I get At my Localhost's webservice? Thanks for your help, I am stuck with this!
-
I created ASP.NET webservice in VS2010 with 2 simple methods: I can test it locally(IP= 192.168.1.104) with http://localhost:4070/Service1.asmx, The localhost = 127.0.0.1 and not the local IP. I go to my other machine on my network, I type in 192.168.1.104:4070/Service1.asmx to try to get at the webservice, and I get the error could not connect to '192.168.1.104:4070'. Am I doing this wrong? How do I get At my Localhost's webservice? Thanks for your help, I am stuck with this!
The "web service" must be configured to allow connections from different computers. Also check the firewall.
-
The "web service" must be configured to allow connections from different computers. Also check the firewall.
Firewall is okay, do yuo have an idea how to configure the webservice part?
-
Firewall is okay, do yuo have an idea how to configure the webservice part?
That depends on how the service is hosted - IIS or the "web server" of Visual Studio.
-
That depends on how the service is hosted - IIS or the "web server" of Visual Studio.
- I originally wanted to host it on VS, I didn't know how to do it. So, I skipped. - I tried to host it on IIS7, I get it partially working. It lists the methods on the remote PC, but doesn't do anything, it says you can test methods only locally. So, if my "Testwebservice" has a
[WebMethod]
public string HelloWorld()
{
return "Hello World!";
}localhost/Testwebservice will allow me to test this function and prints "Hello World" to webpage. On remote PC, I can get to the webservice page that lists the webmethods, but can't test it. What I really need is to be able to read the contents/results of the webservice ie. "Hello World!" from any app on remote PC. How do I do that when I can get the page to display on remotePC? Thanks again
-
- I originally wanted to host it on VS, I didn't know how to do it. So, I skipped. - I tried to host it on IIS7, I get it partially working. It lists the methods on the remote PC, but doesn't do anything, it says you can test methods only locally. So, if my "Testwebservice" has a
[WebMethod]
public string HelloWorld()
{
return "Hello World!";
}localhost/Testwebservice will allow me to test this function and prints "Hello World" to webpage. On remote PC, I can get to the webservice page that lists the webmethods, but can't test it. What I really need is to be able to read the contents/results of the webservice ie. "Hello World!" from any app on remote PC. How do I do that when I can get the page to display on remotePC? Thanks again
How do you find the services on the Remote machine? Do You use add web reference in VS and then find services by a full address including IP and service name? Let me know about your method.
-
Firewall is okay, do yuo have an idea how to configure the webservice part?
The webdev is restricted to the local computer only, you have to setup your default web site using IIS on the local computer to allow access to the entire subnet the computer is on. So if your computer is on 192.168.1, then computers on 192.168.1 can access the page.