Skip to content
This repository was archived by the owner on Dec 26, 2025. It is now read-only.
This repository was archived by the owner on Dec 26, 2025. It is now read-only.

[Bug] Can't use local storage in a SSR #239

@ankainn

Description

@ankainn

Describe the bug
In my login page im using HTTPcontext to authenticate user and i can do that only on static render, but i cant store my data in local storage because of that.
InvalidOperationException: JavaScript interop calls cannot be issued at this time. This is because the component is being statically rendered. When prerendering is enabled, JavaScript interop calls can only be performed during the OnAfterRenderAsync lifecycle method.

I'm using Blazor Web App NET8.
Any ideas how can i solve my problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingResolved: Won't FixThe reported behaviour will not be changed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions