As we have discussed in the Consuming a WCF service from an ASP.NET AJAX client recipe, ASP.NET AJAX script can consume a WCF REST service (with webScript behavior enabled) through the
ScriptManager control. However, this kind of AJAX script client can only consume WCF services that are hosted in the same web application as the Web pages. Trying to access a remote WCF service through the ASP.NET AJAX script will not work. Don’t worry, we have found some alternative ways to work around this problem.
In this recipe, we will demonstrate a very simple way to call a remote WCF REST service in an ASP.NET web page via jQuery-based AJAX script.
Since XSS protection prevents AJAX scripts from ...