mihsathe
mihsathe

Reputation: 9154

AJAX call to web services

The following article on msdn provides the ASP.NET AJAX solution of calling web service with AJAX... http://msdn.microsoft.com/en-us/magazine/cc163499.aspx like

<asp:ScriptManager ID="_scriptManager" runat="server">
  <Services>
    <asp:ServiceReference Path="StockQuoteService.asmx" />
  </Services>
</asp:ScriptManager>

And then to use the class name directly in Jscript. But when I uploaded the service on other domain and tried to do the same, it wouldn't work. Is there no way I can do it or am I missing something? Thanks in advance...

Upvotes: 0

Views: 263

Answers (3)

danny.lesnik
danny.lesnik

Reputation: 18639

Please install Fiddler2 and monitor your request/response, it's very helpful in troubleshooting ajax and web services issues.

Upvotes: 0

brumScouse
brumScouse

Reputation: 3226

You might like to give this a whirl if you are able to use Jquery:

http://jquery-howto.blogspot.com/2009/04/cross-domain-ajax-querying-with-jquery.html

Upvotes: 0

Darin Dimitrov
Darin Dimitrov

Reputation: 1039498

Due to the same origin policy restriction this is not possible. You cannot perform cross domain AJAX calls. One possible workaround is to use JSONP but you will need to have a web service which supports it.

Upvotes: 2

Related Questions