error executing child request for handler 'system.Web.HttpHandlerUtil+serverExecuteHttphandlerAsynWrapper
The model item passed into the dictionary is of type 'System.String', but this dictionary requires a model item of type 'MyProject.Models.UsersClass+LogOn'.
[HttpGet] public ActionResult LogOn(String returnUrl) { using (var db = new pakalaContext()) { UsersClass.LogOn AllFeatureToLog = new UsersClass.LogOn(); if (User.Identity.IsAuthenticated) //remember me { MyClass obj = new MyClass(); if (obj.shouldRedirect(returnUrl)) { return Redirect(returnUrl); } return Redirect(FormsAuthentication.DefaultUrl); } return PartialView(AllFeatureToLog); } } public MyProject.Models.AccountModels.ControlUsers MembershipService { get; set; } [HttpPost] public ActionResult LogOn(UsersClass.LogOn loginInfo, string returnUrl) { if (this.ModelState.IsValid) { if (MembershipService.ValidateUser(loginInfo.usernam, loginInfo.password)) { FormsAuthentication.SetAuthCookie(loginInfo.usernam, loginInfo.RememberMe); MyClass obj1 = new MyClass(); if (obj1.shouldRedirect(returnUrl)) { return Redirect(returnUrl); } else { return RedirectToAction("MainIndex", "Home"); } } else { this.ModelState.AddModelError("LoginError", "incorrec pass or username"); } } return PartialView(loginInfo); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)