How to Check whether Session is Expired or not in asp.net

前端 未结 8 2093
情话喂你
情话喂你 2020-12-03 01:03

I\'ve specified the session timeout in web.config file. When the session is timeout I\'m not getting redirect to the login page but I am getting an error saying object refer

8条回答
  •  -上瘾入骨i
    2020-12-03 01:39

    You can check the HttpContext.Current.User.Identity.IsAuthenticated property which will allow you to know whether there's a currently authenticated user or not.

提交回复
热议问题