Sunday, March 11, 2012

404 problem when calling Web Service from Javascript

I've tested it by putting the webservice on a remote server (not hosted by me) that runs my website - which works like a charm and got the same error, so it seems it must be a problem in the code...

You can only call a web service using ajax if that web service is under the same domain as the web page with the ajax call in it. Your web service path is "http://localhost/testwebservice", which will only work if your default.aspx page is in the same domain, ie:http://localhost/testwebservice

See this thread for more details
http://forums.asp.net/thread/1639269.aspx


Bingo, solved!Big Smile

ThanX!

No comments:

Post a Comment