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 reference not set to an instance.
Can anyone tell me the solution for this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can check the
HttpContext.Current.User.Identity.IsAuthenticatedproperty which will allow you to know whether there’s a currently authenticated user or not.