Webp API post method example
hi,I am new to web api services, i need simple post method to check the User name/ password and return user detail record if not found i want to return error msg.
i am using Asp.net MVC5
Thanks
if (ModelState.IsValid)
{
if (Membership.ValidateUser(model.UserName, model.Password))
{
FormsAuthentication.SetAuthCookie(model.UserName, model.RememberMe);
return RedirectToAction("Index", "Home");
}
else
{
ModelState.AddModelError("", "The user name or password provided is incorrect.");
}
}
// something failed,
return View(model);