Click here to Skip to main content
15,891,423 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
Guys,
Bit of an odd one here.

I have a RESTful WCF service which I'm calling from Javascript. Since the service is hosted in a different domain to the web app, I've run into the CORS problem, but resolved this by adding the appropriate headers to the Response in IIS. This seems to be all hunky dory under IE & Firefox...so far so good...

I've now begun to test this on a Galaxy Tab, using the standard Android browser, but when my call returns, I'm getting status === 0 and empty responseText - precisely what was happening under FF before I'd added the CORS headers....

My Google-Fu appears to have let me down on this one - can't find any information as to what I need to do differently on Android...and I assume I'm going to run into the same problem with iPads and Crackberrys....

As a workaround, I've tried using jQuery.ajax - again, on IE/FF all is fine, but under Android, the jQuery call *appears* to do absolutely nothing...

Anyone shed any light on what I may be doing wrong / what I need to tweak?

****UPDATE****
OK - jQuery calls do actually appear to be doing something now, but I'm always hitting my error: handler, err.statusText === "error" (helpful), err.status === 0.... the plot thickens....
Posted
Updated 15-May-12 0:44am
v2

1 solution

I'm having the same issue (no solution found yet). Did you ever find a fix for this?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900