C
C#17mo ago
Protagonist

❔ ASP.NET SignInManager PasswordSignInAsync Error

Error: System.InvalidOperationException: Headers are read-only, response has already started.
2 Replies
Protagonist
ProtagonistOP17mo ago
private async Task LoginUser()
{
var user = UserManager.GetUserByUsername(username);

if (user != null)
{
var result = await SignInManager.PasswordSignInAsync(username, password, false, false);
if (result.Succeeded)
{
NavigationManager.NavigateTo("/home");
}
else
{
validationMessage = "Invalid username or password.";
}
}
}
private async Task LoginUser()
{
var user = UserManager.GetUserByUsername(username);

if (user != null)
{
var result = await SignInManager.PasswordSignInAsync(username, password, false, false);
if (result.Succeeded)
{
NavigationManager.NavigateTo("/home");
}
else
{
validationMessage = "Invalid username or password.";
}
}
}
the result line is where it crashes and says object reference not set to an instance of an object and also the console error is in the image headers are read only response has already started anyone? top
Accord
Accord17mo ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server