How to make a javascript call for a WCF service hosted in another domain?

We are developing a web application using ASP.NET and AJAX, and we want to place our WCF service level on another website and call JavaScript calls to the service level from our client pages. We understand that the browser does not allow AJAX calls to another port or domain. What is the best way to architecture a solution? We consider the use of a proxy level with services hosted in the same domain as the client that has a link to a web link to the service level. Is there a better solution?

+3
source share
5 answers

Generally, it’s best to limit the number of domains available on your page. Server side proxy is a really good way.

+6
source

I think the best way is to invoke a local page that invokes the remote resource and returns the result. this way you avoid cross-domain issues.

+1
source
  • - , .
  • dll svc - svc dll,
  • -.
0

.

, - - . IIS7, .

0

The prototype has a plugin for this. The problem is with the client, not the server. www.mellowmorning.com/2007/10/25/introducing-a-cross-site-ajax-plugin-for-prototype/

0
source

Source: https://habr.com/ru/post/1697722/


All Articles