public string Post(LoginViewModel value) { string Url = ""; LoginAccessor la = new LoginAccessor(); var user = la.LogIn(value); if (user.Result != null) { var session = HttpContext.Current.Session; var owinAuthentication = new OwinAuthenticationService(new HttpContextWrapper(HttpContext.Current)); owinAuthentication.SignIn((UserModel)user.GetType().GetProperty("Result").GetValue(user)); session[Config.GetAppSetting("SessionKey")] = (UserModel)user.GetType().GetProperty("Result").GetValue(user); Url = "../PR/PRShop"; } return(Url); }