0

I have created a basic web service and I need to access it from android but somehow the web service is only accessible on my local machine, with a local URL like http://localhost:4012/MainWebService.asmx but outside my machine when I try something like 187.120.36.4:4012/MainWebService.asmx the 187.120.36.4 being the IP of my machine hosting the asp.net web service it doesn't go through, all my googling efforts have not paid off so far. So any help will be highly appreciated guys and thanks in advance.

1
  • btw for apache hosted files, I can have access to e.g. i can access a localhost/hostedsite.php on my android via 187.120.36.4/hostedsite.php. They are both connected on same LAN and I am using android as the hotspot, if that will be of any help Commented Jul 17, 2016 at 20:59

2 Answers 2

1

First you need IIS Server. This is how to enable it on W10. Next you need to configure you ASP project to run on the IIS server. Now you should be able to access your webservice on 187.120.36.4:4012/MainWebService.asmx.

BTW. That looks like your external IP. Are you sure it is correct? I would suspect something like 192.168.x.xxx

Sign up to request clarification or add additional context in comments.

3 Comments

my ip is 192.168.xx.xxx but i gave that out as just an example, anyways so how do i configure the asp to run on iis server?
I believe it was somewhere in the solution properties
Thanx man you helped me almost get there, because i still have "HTTP Error 404.17 - Not Found: The requested content appears to be script and will not be served by the static file handler" error
1

If your machine is connected to a router then you need enable port forwarding on your router to your local machine and then run your web service in your local machine.

After you have it set up your connect url will be http://<your public ip address>:port number where public ip address is your router's external ip address.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.