After logout if browser back button press then it go back last screen

前端 未结 6 1788
执念已碎
执念已碎 2020-12-13 09:58

Hello I am developing a solution in MVC in first time so I am facing a big issue, When I logout from my application(mvc razor web application) it displays login page, but if

6条回答
  •  悲哀的现实
    2020-12-13 10:40

    protected void Application_BeginRequest()
            {
                Response.Buffer = true;
                Response.ExpiresAbsolute = DateTime.Now.AddDays(-1d);
                Response.Expires = -1500;
                Response.CacheControl = "no-cache";
                Response.Cache.SetNoStore();
            }
    
    Add [Authorize] filter on each controller
    

提交回复
热议问题