ahmedsalah
Active member
- Joined
- Sep 26, 2018
- Messages
- 32
- Programming Experience
- 3-5
I work on Web API c# web app . I face issue I can't login success although I have same username and password .
when make break point on websecurity.login then trace it jump to ModelState.AddModelError
so are there are any settings remaining or some configuration not done .
I have same user name and password that exist on table webpages_Membership
but not logged in success .
so what I do to solve issue please .
I use username sa on userprofiles table and password on YWhtZWRzYTEyMw== on webpages_Membership with same user id
when make break point on websecurity.login then trace it jump to ModelState.AddModelError
so are there are any settings remaining or some configuration not done .
not login success athough user name and password exist:
public JsonResult Login(LoginModel model, string returnUrl)
{
if (WebSecurity.Login(model.UserName, model.Password, model.RememberMe))
{
}
ModelState.AddModelError("", "error");
return Json(new { Ok = false, Message = main.LoginError, status = "activated" });
}
but not logged in success .
so what I do to solve issue please .
I use username sa on userprofiles table and password on YWhtZWRzYTEyMw== on webpages_Membership with same user id