Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blazor Wasm global scope #1871

Closed
bruno-garcia opened this issue Aug 22, 2022 · 1 comment · Fixed by #1931
Closed

Blazor Wasm global scope #1871

bruno-garcia opened this issue Aug 22, 2022 · 1 comment · Fixed by #1931
Assignees
Labels
Feature New feature or request

Comments

@bruno-garcia
Copy link
Member

bruno-garcia commented Aug 22, 2022

Problem Statement

Global scope:

public bool IsGlobalModeEnabled { get; set; }

by default relies on AsyncLocal. This is optimal for web servers, where we PushScope at the start of web requests to have isolation for Logs, HTTP data, etc.

This is an issue on Client apps such as Mobile and Desktop. It turns out on Blazor WASM it's the same issue. Users set scope such as User when retriving a user from the backend, and expect any subsequent event will include that data.

Solution Brainstorm

Possibly enable global mode for Blazor WASM out of the box.

Come from Zendesk

@bruno-garcia bruno-garcia added Feature New feature or request Platform: .NET labels Aug 22, 2022
@mattjohnsonpint
Copy link
Contributor

mattjohnsonpint commented Sep 15, 2022

Looks like we should just detect running in a browser at runtime and set global mode true for that. This is pretty small then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants