I originally have code using HttpContextBase from System.Web in my ASP.NET Web MVC project.
I would like to extend this functionality to a project that is using .NET Core by moving the code into a .NET Standard Library so both projects using ASP.NET Web MVC and ASP.NET Core respectively can use it.
Is there a replacement library or method I can use instead of HttpContextBase in my .NET Standard library to share code?
Check out Microsoft.AspNetCore.SystemWebAdapters looks like it provides a few ways to convert between System.Web.HttpContext and Microsoft.AspNetCore.Http.HttpContext, and the surrounding docs have some additional guidance for migrating from ASP.NET to ASP.NET Core
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With