vs2013开发的项目,在本地发布运行正常,但是发布到服务器上,登陆成功后,跳转后报404错误,找不到文件。网上搜了解决404错误的解决方法,基本上都试过了,还是没找到解决方法,不知道哪位大神也遇到过这样的问题,比较着急。我的登录成功的跳转实在登录页的前端设置的 $(":button").click(function () {
$.ajax({
type: "GET",
url: "/Handle/Login/LoginControl.ashx",
//data: $("#AddLateAndApply").serialize(),
data: {
"hidOperation": "login",
//"hidCountryID": $("#hidCountryID").val(),
"txtUserNum": $('input[name="loginuser"]').val(),
"txtUserName": $('input[name="loginpwd"]').val(),
},
async: false,
success: function (msg) {
if (msg == "ok") {
alert("登录成功!");
result = true;
location.href = "../main.aspx";//onclick="javascript: window.location = 'main.aspx'"
} else {
alert("没有此人员!");
result = false;
}
}
})
})