-
-
Notifications
You must be signed in to change notification settings - Fork 407
In 8.1.1 (prob in 9 too) - when ".UseInMemoryApplicationContextManager = true" you get "Unable to resolve service for type 'Csla.State.ISessionManager'" #3930
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
Labels
Comments
swegele
added a commit
to swegele/csla
that referenced
this issue
May 13, 2024
…tes which will stop ASPNet from including StateController (and it's CTOR services) in service registration; implementing a no-op session manager when inmemory app context manager is used.
rockfordlhotka
added a commit
that referenced
this issue
May 13, 2024
#3931) * #3930 - Fix for v8.x branch removing api controller attributes which will stop ASPNet from including StateController (and it's CTOR services) in service registration; implementing a no-op session manager when inmemory app context manager is used. * Fix file header info --------- Co-authored-by: Rockford Lhotka <[email protected]>
rockfordlhotka
added a commit
that referenced
this issue
May 13, 2024
swegele
added a commit
to swegele/csla
that referenced
this issue
May 13, 2024
…tes which stops ASPNet from including StateController (and it's CTOR services) in service registration; implementing a no-op session manager when inmemory app context manager is used.
swegele
added a commit
to swegele/csla
that referenced
this issue
May 13, 2024
StefanOssendorf
added a commit
that referenced
this issue
May 13, 2024
#3933) * #3930 - Fix for main branch removing api controller attributes which stops ASPNet from including StateController (and it's CTOR services) in service registration; implementing a no-op session manager when inmemory app context manager is used. * switching NotImplemented to NotSupported exceptions...good idea stefan; * fixes from review; * missed one; --------- Co-authored-by: Stefan Ossendorf <[email protected]>
rockfordlhotka
added a commit
that referenced
this issue
May 13, 2024
Co-authored-by: Stefan Ossendorf <[email protected]>
rockfordlhotka
added a commit
that referenced
this issue
May 13, 2024
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
First noticed by @russblair mentioned on discord channel
Confirmed by @swegele
Repro:
Blazor Server-Interactive Only project (no wasm or any refs to new .NET 8 state management stuff)
Config in blazor server program.cs
Csla config correctly skips making any reference or registration to any state management stuff. But none-the-less somehow .NET DI is looking for
ISessionManager
. We think that ASPNet is scanning the project (and it's dependencies) for controllers and it finds the[ApiController]
attribute here:Csla.AspNetCore.Blazor.State.StateController
WORKAROUND
I did a test workaround suggested by @TheCakeMonster making a no-op implementation for the
ISessionManager
interface and registered it. With this the DI error goes away and project runs as expected.The text was updated successfully, but these errors were encountered: