I have a web site at http://sub1.mysite.com and a web service at http://sub2.mysite.com. I'm trying to use a script reference in my script manager to allow AJAX calls to the web service. When I trigger the call, I get a popup that says the call failed. The error appears to be because a 404 is coming back on the web service call. I know the script reference has to be within the same domain, but does it have to be in the same subdomain? Is there a way to trick it to work (like setting document.domain to allow javascript)?
It is not possible to call any other WS which resides in different Domain. You can read this article(Cross Doman Sectiion) for more detailshttp://dotnetslackers.com/columns/ajax/MashitUpwithASPNETAJAX.aspx.
Maybe you can try this JSONP approach to solve your issuehttp://weblogs.asp.net/rashid/archive/2007/09/28/implement-jsonp-in-your-asp-net-application.aspx
No comments:
Post a Comment