[英]Redirecting to another page from Session_end in global.asax
I need to redirect the user to the login page on session timeout. 我需要在会话超时时将用户重定向到登录页面。 The issues with Session_End method in the global.asax are: global.asax中的Session_End方法存在以下问题:
Isn't Session_End raised directly on server, without any interaction from user? 没有用户的任何交互,不是直接在服务器上引发Session_End吗?
What happens, when I go to your page (and start a session), close browser window and never return? 当我转到您的页面(并开始一个会话),关闭浏览器窗口并且永不返回时,会发生什么情况? Then it's understandable, that HttpContext.Current.Response
is null. 可以理解HttpContext.Current.Response
为null。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.