GithubHelp home page GithubHelp logo

Comments (1)

Sebbs128 avatar Sebbs128 commented on August 11, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.