Closed jmpotvin closed 4 months ago
I think this is just a configuration issue. I'm pretty sure we fixed the underlying bug behind this exception, and probably didn't update the configuration of the sample app.
The solution should be to use a different application context manager, specifically:
Edit:
Hmm, now I'm not sure. the config explicitly uses the new context manager, because it should be using the new CSLA Blazor state management subsystem:
So there may be some other issue occuring here that'll require some research.
I tested this against the 8.2.5 codebase and can't replicate, so the fix will be in the next release.
Thanks! I'm upgrading my project from 7 to 8 and encountering the same error message. Do you have a planned release date for 8.2.5?
We'll push the release as soon as possible, probably in the next few days.
I take it back. Upon further testing today, I am still able to replicate the issue in the v8.x branch.
You have my prayers.
Have a nice day.
Kevin
From: Rockford Lhotka @.> Sent: Friday, July 5, 2024 3:26 PM To: MarimerLLC/csla @.> Cc: Subscribed @.***> Subject: Re: [MarimerLLC/csla] BlazorExample Solution doesn't work with 8.2.4 - Error:Do not call GetAuthenticationStateAsync outside of the DI scope for a Razor component. Typically, this means you can call it only within a Razor component or inside another DI...
I take it back. Upon further testing today, I am still able to replicate the issue in the v8.x branch.
— Reply to this email directly, view it on GitHubhttps://github.com/MarimerLLC/csla/issues/4075#issuecomment-2211431954, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGJTVDRZYRFOWL4GVHDIZUDZK4FQ3AVCNFSM6AAAAABKJYRPR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJRGQZTCOJVGQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>
@jmpotvin, @kcabral817 - the fix should be in NuGet now.
I have upgraded the provided BlazorExample to CSLA 8.2.4
Version and Platform CSLA version: 8.2.4 OS: Windows 10 Platform: ASP.NET Core
Code that Fails Just start the solution and click on List People or Add Person.
Stack Trace or Exception Detail The following error is displayed on the screeen: Do not call GetAuthenticationStateAsync outside of the DI scope for a Razor component. Typically, this means you can call it only within a Razor component or inside another DI service that is resolved for a Razor component.