-
카테고리
-
세부 분야
백엔드
-
해결 여부
미해결
로그인실패
19.05.06 20:35 작성 조회수 127
0
var user = new ApplicationUser { UserName = model.Email, Email = model.Email };
var result = await _userManager.CreateAsync(user, model.Password);
if (result.Succeeded)
{
return RedirectToAction("Login");
}
result 값을보면 null로 자꾸반환되는데 원인을 모르겠어요... 어디서부터확인을해야할까요?
답변을 작성해보세요.
0
SEJONG IT EDU
지식공유자2019.05.07
startup.cs ConfigureServices함수
services.AddDbContext<MyAppContext>(options =>
{
options.UseSqlServer(_config.GetConnectionString("MyAppConnection"));
});
services.AddIdentity<ApplicationUser, IdentityRole>(options =>
{
options.Password.RequiredLength = 6;
})
.AddEntityFrameworkStores<MyAppContext>();
확인하시고
유저 테이블들 생성된것도 확인하시기 바랍니다.
MyAppContext.cs도 체크
MyAppContext : IdentityDbContext<ApplicationUser>
답변 1