public IActionResult Index() { if (User.Identity.IsAuthenticated) { cl.SendMessage("1", User.Identity.Name, "10.42.104.192", 8145); List <String> list = System.IO.File.ReadLines(path + filename).ToList(); { foreach (string item in list) { qNumber = Int32.Parse(item); } } if (qNumber > 0) { return(RedirectToAction("queue")); } else { return(View("index")); } } else { return(Content("Wrong Ussername or Password")); } }