Issue threading when run login identity on blazor server ?

ahmedaziz

Well-known member
Joined
Feb 22, 2023
Messages
55
Programming Experience
1-3
I working on blazor server . i get issue evaluation function required all threads to run

i get this error when login on

asp.net:
var resultIdentity = await signInManager.PasswordSignInAsync(UserName, "xxxxx", false, false)
it stop on this line and hang and stuck on debugging

so what is issue and how to solve it
 
Of course it will stop. You told the computer to wait for the result by using await. That is by design.

Now, the issue is if by using await, your entire program completely locks up in a deadlock. That would mean that whatever backend you implemented for the sign-in manager to use is likely deadlocking itself.
 
It can be easy to do too, if you inappropriately mix sync and async code on Blazor server

Generally when I do blazor dev these days I just use Azure AD for my identity management, it's a way of getting auth and its associated challenges off my desk and it Just Works
 
so can you help me answer these questions
1- are this issue must solved or this is normal and no impact for it
2- if i publish my blazor web app will stuck and hang on same line or what
please can you answer me for these questions please ?
 
That line of code is correct. As we have been alluding to, the problem lies in the identity system backend that you are using. signInManager.PasswordSignInAsync() is battle tested. But it is just a wrapper that calls your identity system. You have not identified what system you are using.
 
Back
Top Bottom