私のAjaxリクエストに問題があります。メインスレッドのXMLHttpRequestは、My Ajaxリクエストで非推奨です
私がAjaxリクエストでログインしているときは、/ Employee/LoginのPOSTでコントローラが正常に動作しています。
ですが、返信応答はJSONタイプであり、ホームページに正しくリダイレクトされません。ここ
は私のAjaxの機能は、私が実際に私を提案してください
Click Here to Show error image
の下にエラー画像を添付した
関数ログイン(){
ShowProgressImage();
// var parameteres = $("#frmAdminLogin").serialize();
var parameteres = {
"UserName": $("#UserName").val(),
"Password": $("#Password").val(),
"RememberMe": $("#RememberMe").is(":checked")
};
$.ajax({
url: "/Employee/Login/",
type: "POST",
data: JSON.stringify({ "objAdminLoginViewModel": parameteres }),
cache: false,
contentType: "application/json; charset=utf-8",
success: function (result) {
if (result.ResponseCode == 1) {
window.location = "/Product/Index/?filterby=recent";
}
HideProgressImage();
},
error: function (jqXHR, textStatus, errorThrown) {
HideProgressImage();
}
//complete: function() {
// window.location.href = "/Product/Index/?filterby=recent";
//}
});
}
です私は間違っています。
ありがとうございます。
このhttp://stackoverflow.com/questions/27736186/jquery-has-deprecated-synchronous-xmlhttprequestをご覧ください。私は非同期使用していない –