asp.net mvc4 응용 프로그램을 사용하고 있습니다. 양식 인증을 사용하고 있습니다. 내 시나리오는 인증 후 auth 토큰이 IE를 사용할 때 요청 헤더에서 전달하지 않습니다. 하지만 크롬과 모질라는 잘 작동합니다. 제 인증 방법은 첫 번째 방법으로하고 두 번째 방법은 아약스 호출입니다. 아약스 호출에 문제가 있습니까?인증 토큰이 IE에서 전달되지 않습니다
첫 번째 인증 방법은 getjson 메서드입니다. 그런 다음 저는 아약스 호출을 사용하고 있습니다.
if (user != "" && passwd != "" && location != "" && location != -1) {
$.getJSON(window.contexthttproot + "/Account/Location", { 'Username': user, 'Password': passwd }, function (items) {
if (items.length > 0) {
$('#Serverow').hide();
$('#locate').show();
$('#location').show();
$("#Username").attr("disabled", "disabled");
$("#Password").attr("disabled", "disabled");
$("#Location").fillSelect($.map(items, function (item) {
return {
ID: item.LocationID,
Name: item.LocationName
};
}));
setTimeout(function() {
$('#spinner').fadeOut('fast');
})
}
else {
setTimeout(function() {
$('#spinner').fadeOut('fast');
})
}
});
}
}
if (user != "" && passwd != "" && location != "" && location != -1) {
var json = "{'location':'" + location + "','locationName':'" + loctext + "'}";
$.ajax({
url: window.contexthttproot + "/Report/ReportLocation",
type: 'POST',
datatype: "json",
contentType: "application/json; charset=utf-8",
cache: false,
data: json,
success: function (items) {
window.location.replace("/LandingPage/Landing");
setTimeout(function() {
$('#spinner').fadeOut(35000);
})
},
error: function (xhr, status) {
}
});
}
IE의 버전은 무엇입니까? –
이것을 확인하십시오 http://stackoverflow.com/questions/19725827/internet-explorer-11-session-issue-with-asp-net-4-0 –
@Pjack IE 11 사용. – Sajeev