开发者

Web Service works in IE7 but not Firefox

开发者 https://www.devze.com 2022-12-12 05:53 出处:网络
I have a .Net web service that I call from javascript using: $.ajax({ type: \"POST\", url: \"http://myServerIP/Myervice.asmx/MyMethod\",

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

精彩评论

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