I am encountering some issues configuring local storage in Blazor .NET Core 8. After updating my project, I found that since the pages are now created on the server, it's not possible to access the browser's local storage.
I have tried using Blazored Local Storage, JavaScript, and ProtectedSessionStorage, but none seem to be effective. Additionally, I attempted to configure the page to not pre-render in the following manner:
@rendermode @(new InteractiveServerRenderMode(prerender:false))
I use the local storage a lot to update the cart shop from the website.
Any ideas?
Regards, Jair
Here's a video of what happend when I try to create a shop cart using the local storage
I have the use the local storage during the process because is how i send the information between pages. My code bellow:
In this part I call the method cart
This is the local storage service


You could use
ProtectedLocalStoragein blazor server rendermode, Just try following in a per page/component project:Test result:
