We developing web application using MVC4 and Jquery Mobile. Recently we found one major issue which is "User using another account in same browser" so its overiding the existing account current browser. So we decided not to allow user to use two different account in one browser. We searched lot but unable to find perfect solution. So we tryed below code before login page load. [AllowAnonymous] public ActionResult Index() { if (!Request.IsAuthenticated) { return View("mLogin"); } else { return View("UserAlready"); } } In login controller we written this code. The login page will be shown only when user is not registered. Once he Authenticated we restrict him from loading login page again. My question. Is this correct method ? Is it have any drawback? Or any other better approach is there?
System.Web.HttpContext.Current.User.Identity.IsAuthenticated
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)