How to check whether a session exists or not?
I want to do this on each page, if not exist I will just send the user back to the sign in page. 
How to check whether a session exists or not?
I want to do this on each page, if not exist I will just send the user back to the sign in page. 
Use this code for Session_Start event in global.asax file:
void Session_Start(object sender, EventArgs e) { if (User.Identity.IsAuthenticated) { System.Web.Security.FormsAuthentication.SignOut(); System.Web.Security.FormsAuthentication.RedirectToLoginPage(); } }