开发者

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..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜