As discuessed in #3815 (comment) there is a potential bug in ApplicationContextManagerBlazor and ApplicationContextManagerInMemory.
See the following code:
|
try |
|
{ |
|
task = AuthenticationStateProvider.GetAuthenticationStateAsync(); |
|
} |
|
catch (InvalidOperationException ex) |
|
try |
|
{ |
|
task = AuthenticationStateProvider.GetAuthenticationStateAsync(); |
|
} |
|
catch (InvalidOperationException ex) |
In both cases the task is retrieved but not awaited which means an implementation of GetAuthenticationStateAsync() with real async code does not raise any exception here.
The ServerAuthenticationStateProvider throws an exception without bein async which means the exception is immediately thrown and not when the task is awaited. (c.f. #3815 (reply in thread))
As discuessed in #3815 (comment) there is a potential bug in
ApplicationContextManagerBlazorandApplicationContextManagerInMemory.See the following code:
csla/Source/Csla.AspNetCore/Blazor/ApplicationContextManagerBlazor.cs
Lines 71 to 75 in 2799406
csla/Source/Csla.AspNetCore/Blazor/ApplicationContextManagerInMemory.cs
Lines 61 to 65 in 2799406
In both cases the task is retrieved but not awaited which means an implementation of
GetAuthenticationStateAsync()with real async code does not raise any exception here.The
ServerAuthenticationStateProviderthrows an exception without bein async which means the exception is immediately thrown and not when the task is awaited. (c.f. #3815 (reply in thread))