Comments (1)
I'm currently going through this process in one of solution's business layer (I started this process before discovering SystemWebAdapters, but I now plan to make use of it for when we're able to start moving the web apps over). I just wanted to share what I've encountered so far on this topic.
One of my first thoughts was somehow using a derivation of ASP.NET Core's HttpContext
(even via an IHttpContextAccessor
). However, those classes/interfaces are only available through the Microsoft.AspNetCore.App.Ref package (and advice is to not use it as a normal package reference).
Unless the Microsoft.AspNetCore.Http[.Abstractions] package(s) is going to be reintroduced with .NET 7, it seems the way off of System.Web Adapters (and the plan I'm currently following) is a IHttpContextAdapter
with implementations returning the parts of System.Web.HttpContext
and Microsoft.AspNetCore.Http.HttpContext
that the code needs (eg. IPrinciple
, user agent, IP address and so on).
However, the implementation of the ASP.NET Core HttpContext
adapter would need to live in or near the ASP.NET Core app project itself to avoid the Ref package reference issue. In solutions with multiple web app projects we'll either end up multiple implementations (one in each aspnetcore app project) or having a class library that will have to have a PackageReference to Microsoft.AspNetCore.App.Ref.
from systemweb-adapters.
Related Issues (20)
- HttpRequest Params or indexer throws InvalidOperationException when request has content type other than form.
- How do I dynamically register a session key? HOT 3
- HttpRequest.Params doesn't return the values like framework did
- Add Support for HttpContext.RewritePath of 2 params and 4 params HOT 1
- Issue of HttpApplication.GetVaryByCustomString HOT 1
- Add Missing API: "System.Web.Hosting.HostingEnvironment.SiteName" and "System.Web.Hosting.HostingEnvironment.ApplicationID" HOT 2
- Some Http*Wrapper classes' constructors should check null param as they do in .NET Framework
- 404 error on "<yarp>/systemweb-adapters/authenticate?original-url=%2FTicket" when trying to go to Core page HOT 5
- UnknownSessionKeyException - errors for registered keys HOT 5
- Consider supporting `System.Web.Security.MachineKey`
- Is there any correlation between adding more routes and cookie size HOT 1
- Custom framework Identity object isn't authenticating in core. HOT 2
- How to set up mocks/stubs for testing? HOT 3
- Documentation: RemoteAuth using old syntax
- Just testing
- Add Support for HttpContextBase.RewritePath and HttpContextWrapper.RewritePath
- Sharing Sessions between .NET Framework and ASP.NET Core app overwrites HttpContext.Current.Session HOT 5
- Session serializer does not support nullables
- Caching.Cache.Insert is missing the overload with 3 arguments
- Support for UrlHelper methods during incremental migration HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from systemweb-adapters.