Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP .Net VNext and Owin

I am exploring the features of ASP .NET VNext. In previous versions of .NET, Owin is used for self hosting of applications as well as hosting in any Owin compatible web servers including IIS. As per my understanding, ASP .NET VNext itself is host agnostic and has commands for self hosting of the application. Now, what is the place of Owin in ASP .NET VNext. I have seen many articles taking about Owin and Asp .NET VNext separately but I need to know how to put them together.

I am a beginner.Correct me if I am wrong.

like image 551
AnandhaSundari M Avatar asked Feb 03 '15 19:02

AnandhaSundari M


1 Answers

You are right about your confusion. Whatever experience I have with ASP.net vnext (Mainly with VS 2015 Preview and VS 2015 CTP5).

Now let me share something you about OWIN and ASP.net vnext.

  1. As per implementation of ASP.net vnext , OWIN type of pipeline integrated into that. In vnext there is interface called "IApplicationBuilder" and in OWIN "IAppBuilder"

  2. As of now not all component build based on OWIN will not be used in ASP.net vnext but as time goes all component get transfered or have different version for vnext support. As of now in ASP.net vnext you can use Owin component by using IApplicationBuilder extention method UseOWIN. https://github.com/aspnet/HttpAbstractions/blob/dev/src/Microsoft.AspNet.Owin/OwinExtensions.cs

  3. If you look at Startup.cs file on VS 2015 Preview or CTP5 for ASP.net vnext project then you will get idea then it is somewhat similar concept like Middleware , Register to pipeline.

Surely there is difference between implementation but ASP.net vnext allow to run OWIN component.

like image 165
dotnetstep Avatar answered Sep 29 '22 18:09

dotnetstep