I managed to create some REST services and they’re perfectly accessible through the browser, e.g. http://localhost:port/uri/template/value – and it returns the value. However, I am having problems accessing it through jQuery. I have previously created MVC controller actions that I could access through $.ajax() calls, but this one has me stumped. I’m probably missing either something big, or tiny but crucial. Instead of pasting code here the VS2010 solution file has been zipped up here: http://savitarbernese.com/WCF_Prototypes.zip.
Any assistance would be greatly appreciated.
Thanks,
Dany.
If your web pages are being served from a different port than the web services, then that’s a cross domain call, and it won’t work. You may need to either host the services on the same port, or else look into supporting Jsonp on them.