Basically its a get method .when the function hit first time it simply return the view of login page after that when i set session value,after that in post back request it give me an exception object instance
var sessionvar = System.Web.HttpContext.Current.Session["EmployeeName"].ToString();
if (!String.IsNullOrWhiteSpace(sessionvar))
{
return RedirectToAction("ViewWareHouseList", "Inventary");
}
return View();
}