Reputation: 672
we are using AspNetCore.Http with MyController : Controller
. How do I get Get OwinContext this.Request.GetOwinContext();
doesnt work.
'HttpRequest' does not contain a definition for 'GetOwinContext' and the best extension method overload 'OwinHttpRequestMessageExtensions.GetOwinContext(HttpRequestMessage)' requires a receiver of type 'HttpRequestMessage'
Upvotes: 0
Views: 1640
Reputation: 4022
ASP.NET Core:
.NET
(OWIN).Microsoft.Owin.* (Katana)
libraries.OWIN allows web apps to be decoupled from web servers. It defines a standard way for middleware to be used in a pipeline to handle requests and associated responses. ASP.NET Core applications and middleware can interoperate with OWIN-based
applications, servers, and middleware.
OWIN provides a decoupling layer that allows two frameworks with disparate object models to be used together.
The Microsoft.AspNetCore.Owin
package provides two adapter implementations:
This allows ASP.NET Core to be hosted on top of an OWIN compatible server/host or for other OWIN compatible components to be run on top of ASP.NET Core.
Note:
Using these adapters comes with a performance cost. Apps using only ASP.NET Core components shouldn't use the Microsoft.AspNetCore.Owin package or adapters.
Upvotes: 1