[英]Cross domain ajax call windows authentication working in chrome and not working in Firefox
我有使用Windows身份验证的WCF服务,并使用ajax调用来调用此服务。 对于谷歌浏览器,它是完美的工作,因为凭据已兑现,但是在Firefox中,我得到了401未经授权。 我希望firefox会弹出一个弹出窗口来填充我的凭据(就像我从浏览器中调用服务时一样)。
我的JavaScript代码如下:
var url = "http://localhost:8732/Domain.WebServices/MyService/web/MyFunction";
$.ajax({
type: "GET",
url: url,
crossDomain: true,
processData: false,
xhrFields: {
withCredentials: true
},
error: function (XMLHttpRequest, textStatus, errorThrown) { alert('failed'); },
success: function (data) { onSuccess(data); }
});
当凭据未兑现时,如何在Firefox中工作?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.