Open SohJel opened 5 years ago
I also used register.Name but it did not work!!! The values were in DB too. I tried with .FindByEmailAsync(register.Mail) too but it did not work. I used breakpoint on begin of "AccountController.cs" and I saw "register.Mobile" value was "CORRECT" but unfortunately "user" value was "NULL"!!! I also created a new project and implemented previous project into it, but it didn't work. Please note that I have Windows 10 and VisualStudio 2017 15.9.5 and VisualStudio 2019 preview 1.1 installed on my computer.
I'm writing a project with asp.net core mvc 2.2, my problem is: During authentication ".FindByNameAsync()" alyays aeturns "NULL" and therefore authentication process is not successful. My LOGIN form contains:
And my AccountController.cs contains:
[HttpPost] public async Task Login(Register register)
{
if (!ModelState.IsValid)
return View();
And my database table is:
public class Register {
}
Please help me to get rid of this problem.