0
votes

I know that cross domain web service calls are restricted by default using Javascript including jQuery.

While this is true, I have the following scenario;

An ASPX page with jQuery hosted on http:localhost:9999 calling a web service which is hosted on http://xx.xx.xxx.xxx:8888

According to the above, the jQuery will be doing a cross domain web service call. Why is it so that it is still working all good..? I am not receiving any errors.

I ask this question because in real scenario both the servers hosting ASPX page and the web service will be completely different and I am not sure whether this is going to work by default.

Note: I am not using JSONP or any other utilities to have this cross domain calls function properly.

I was thinking of implementing an ASPX page (as a web service caller page) which is solely for calling the web service. This is to circumvent the cross domain call error.

Please shed some light if possible.

Thanks.

1
A server can permit cross domain requests by emitting the appropriate CORS headers that tell the browser it's OK to access this server.jfriend00

1 Answers

0
votes

It is possible the web service you are accessing has implemented Cross-Origin Resource Sharing (CORS) to specifically permit this.