Skip to content

CSLA 8 uses wrong IContextManager in aspnetcore when Blazor Server is also used #4182

@rockfordlhotka

Description

@rockfordlhotka

If you have a Blazor 8 app that does the following:

  1. Is configured to use CSLA state management, so state is kept in sync between server and wasm, including user identity
  2. Is configured to not flow the user from the wasm client to the data portal server (this is the default)
  3. Makes a data portal call from a wasm client to the aspnetcore/Blazor server
  4. The data portal on the server makes another root data portal call (such as a UoW object)
  5. That second data portal call should be using the aspnetcore IContextManager, but it continues to use the state-aware Blazor context manager
  6. This fails, because the data portal attempts to call SetUser, thinking it is running in aspnetcore, but having the wrong context manager (Blazor server) which doesn't support setting the user

The fix is to ensure that, with a cascading root data portal call like this, that the correct context manager is used.

Probably related to #4075

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions