I am a novice .net programmer made a webservice(JS calls the Webserice in my code) and was just trying to call it via my phones browser as am on the same network. With localhost it works perfect. But it fails to call the webservice method from other machine as well. What is the idea behind it and ddoes JSONP be of any help?
Share
It would have helped a lot if you had described what type of webservice you are trying to call. I assume your webservice is RESTFUL. In that case if you’d try to call it from a different domain through XHR it will not succeed because of the browser’s Same origin policy. And yes JSONP would be the most feasible alternative here.
You might also want to look at Cross origin resource sharing (CORS). It provides a way for web servers to support cross-site access controls.