.net - framework - diferencia asp net core
PasswordSignInAsync se cuelga en la aplicaciĆ³n.Core (0)
Estoy construyendo una aplicación web central .NET en F #, y estoy tratando de configurar la identidad. Tengo una versión básica de un método de registro funcionando, que crea un usuario en la base de datos y crea la cookie:
[<HttpPost>]
[<AllowAnonymous>]
member this.Register([<FromBody>]model: RegisterViewModel) =
if not (isNull model.Email) && model.Password = model.ConfirmPassword then
let user = ApplicationUser(userName = model.Email, email = model.Email, password = model.Password)
let result = userManager.CreateAsync(user, model.Password) |> Async.AwaitTask |> Async.RunSynchronously
if result.Succeeded then
signInManager.SignInAsync(user, isPersistent = false) |> Async.AwaitTask |> Async.RunSynchronously
true
else
false
else
false
Sin embargo, mi implementación de inicio de sesión se bloquea:
[<HttpPost>]
[<AllowAnonymous>]
member this.Login([<FromBody>]model: LoginViewModel) =
if not (isNull model.Email && isNull model.Password) then
let result = signInManager.PasswordSignInAsync(model.Email, model.Password, false, lockoutOnFailure = false) |> Async.AwaitTask |> Async.RunSynchronously
if result.Succeeded then true else false
else
false
Aquí es donde se cuelga la aplicación:
info: Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilderFactory[1]
Executed DbCommand (5ms) [Parameters=[@__normalizedUserName_0=''?'' (Size = 256)], CommandType=''Text'', CommandTimeout=''30'']
SELECT TOP(1) [u].[Id], [u].[AccessFailedCount], [u].[ConcurrencyStamp], [u].[Email], [u].[EmailConfirmed], [u].[LockoutEnabled], [u].[LockoutEnd], [u].[NormalizedEmail], [u].[NormalizedUserName], [u].[PasswordHash], [u].[PhoneNumber], [u].[PhoneNumberConfirmed], [u].[SecurityStamp], [u].[TwoFactorEnabled], [u].[UserName]
FROM [AspNetUsers] AS [u]
WHERE [u].[NormalizedUserName] = @__normalizedUserName_0
¿Alguna idea de cuál podría ser el problema?