Hi, I’m trying out Backendless and was very impressed with the possibilities.
I’m trying to verify the login of a user I have already registered. After logging in I store a cookie with the user email and ID Forms authentication in my application. If I login with the right credential its fine, but when I try a wrong password, it bypasses my catch looking for Backendless Exception and throws a bunch of StackOverflow exception.
Below is the snippet. Can you tell me what I’m doing wrong?
try
{
var _user = new BackendlessUser();
_user = Backendless.UserService.Login(loginUser.email, loginUser.password);
}
catch (StackOverflowException e)
{
/*if (e.BackendlessFault.FaultCode == "3002")
ModelState.AddModelError("Multiple Logins: ", e.Message);
if (e.BackendlessFault.FaultCode == "3003")
ModelState.AddModelError("Invalid User: ", e.Message);
if (e.BackendlessFault.FaultCode == "3036")
ModelState.AddModelError("Account Locked:", e.Message);
*/
return View(loginUser);
}
// Forms authentication
FormsAuthentication.SetAuthCookie(loginUser.email, true);
// All good
return RedirectToAction("Index", "Home");