1.能够在登陆页面加jQuery验证spa
$(function () { //判断一下当前是否是作顶层,若是不是,则作一下顶层页面重定向 if (window != top) { top.location.href = location.href; } });
2.OnActionExecuting方法中修改filterContext.Resultcode
filterContext.Result = new ContentResult() { Content = "<script>top.window.location.href='/user/Login'</script>" };