Skip to content

Wrong IContextManager is used in ASP.NET 5 with LocalProxy #4354

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

Closed
rockfordlhotka opened this issue Nov 29, 2024 · 0 comments
Closed

Wrong IContextManager is used in ASP.NET 5 with LocalProxy #4354

rockfordlhotka opened this issue Nov 29, 2024 · 0 comments

Comments

@rockfordlhotka
Copy link
Member

When using CSLA 8+ with an ASP.NET MVC 5 (and presumably all ASP.NET 5) projects, and a LocalProxy for the data portal, the logical server-side data portal attempts to use Csla.Web.Mvc.ApplicationContextManager. The problem is that HttpContext is not available in logical server-side code, and so the data portal call fails.

The Csla.Web.Mvc.ApplicationContextManager knows it is invalid - but it gets used anyway.

It seems that ApplicationContextAccessor is returning the invalid context manager rather than a valid option, because there is no check for this case in the code.

@rockfordlhotka rockfordlhotka self-assigned this Nov 29, 2024
@rockfordlhotka rockfordlhotka moved this from Todo to In Progress in CSLA Version 9.0.0 Dec 3, 2024
@rockfordlhotka rockfordlhotka closed this as completed by moving to Done in CSLA Version 8.2.8 Dec 6, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in CSLA Version 9.0.0 Dec 6, 2024
rockfordlhotka added a commit that referenced this issue Dec 13, 2024
* #3785 Update to .NET 9 package references

* #3785 Update to .NET 9 package references

* #3785 Update to .NET 9 package references

* #3785 Update to .NET 9 package references

* #4354 Use correct context manager for aspnet classic

* Add global.json to solution files

* #4360 Create packages for generators

* Update v9 upgrade guide with RabbitMQ changes and NRT

* Add missing net8 TFM in Grpc and RabbitMQ projects

* Add missing NRT clarification

* Revert MAUI controls update because they cause the build to fail

* #3785 Update for CSLA 9

---------

Co-authored-by: Stefan Ossendorf <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

1 participant