Web Service works in IE7 but not Firefox
I have a .Net web service that I call from javascript using:
$.ajax({ type: "POST", url: "http://myServerIP/Myervice.asmx/MyMethod",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "jsonp",
success: function(msg) { alert('sucess ' + msg); },
error: function(XMLHttpRequest, textStatus, errorThrown) { alert(XMLHttpRequest); alert(textStatus); alert(errorThrown); }
});
I get a success message in IE7 and in Firefox I don't get any decent errors back just 'error' and 'undefined'
I suspect this is due to the fact that I'm on an开发者_JAVA技巧 Intranet here and IE7 is taking my credentials and passing them to IIS on 'myServer' on my behalf while other browsers cannot.
Is this the case?
How do I go about fixing this problem?
Thanks in advance
Davy
Maybe there is something going on with the datatype 'jsonp'. Read this, try using a different datatype..
精彩评论