Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accessing web services localhost from computer on network

I'm trying to develop an iPhone application to consume a Web Service written in C#. I want to be able to access the web page through the localhost on my PC (http://localhost:54053/Service1.asmx) so I don't have to push the Web Service live just yet. Any recommendations on how to do this?

Thank you very much.

like image 750
Sam Youtsey Avatar asked Jun 16 '26 13:06

Sam Youtsey


2 Answers

You will have to use IIS on your development machine. The built-in Cassini server binds directly to 127.0.0.1 and is only accessible locally. To access it from a remote device, you need to set up a host in IIS. Cassini has a limitation to 127.0.0.1 and is not accessible remotely.

Once you have a website set up to answer to an IP address that is not 127.0.0.1, and it's configured to serve your new web service, then you can use the IP address to get to it.

like image 118
Joel Etherton Avatar answered Jun 19 '26 05:06

Joel Etherton


First make it work like

http://localhost/Service1.asmx

To do this you have to make your web service work within local IIS.

Then find the Ip of your local machine.

www.whatismyipd.com

Then be sure that the port 80 is open (If you're not sure how to do this try switching the windows firewall off)

Then call the web service with your IP address as: http://xxx.xxx.xxx.xxx/Service.asmx

like image 39
Aykut Akıncı Avatar answered Jun 19 '26 05:06

Aykut Akıncı