[英]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.