Run Asp.Net Mvc as OWIN middleware? - asp.net-mvc

Is it possible to run Asp.Net Mvc as OWIN middleware? What is necessary for this? I can't seem to find anything about this but I have no idea why it wouldn't be possible.
Is it possible? Is it easy? Does the question make sense?

Currently ASP.NET MVC doesn't run on OWIN. Web API will because it's been decoupled from System.Web, specifically HttpContext. This is the main dependency that prevents MVC from running on OWIN as well.
Some alternatives that do run on OWIN are FubuMVC, Nancy and Simple.Web

No, MVC depends on System.Web.dll (and thus IIS).

Checkout project Helios. Possibly fill the need.

You may look at Katana.Boot.AspNet but as Chris Ross said it's just a "hello world" prototype without any futher development. Also you may look at OWIN Gate's era ASP.NET pipeline adapter.

Related

ASP.NET MVC in vNext and System.Web Dependency

I was reading These notes
ASP.NET vNext includes updated versions of MVC, Web API, Web Pages, SignalR and EF. The key improvement with these frameworks is that MVC, Web API and Web Pages have been merged into a single programming model. For example, there’s now unified controller and routing concepts between all three. You can now have a single controller that returns both MVC views and formatted Web API responses, on the same HTTP verb.
Knowing that Web API and SignalR does not have a dependency with System.Web, thus one can self-host them with Katana/Owin, does anyone know what's the story with MVC in the vNext? Does it still depend on System.Web or are we finally going to ditch it?
I think I found the answer here:
ASP.NET vNext - Everything you need to know in 4 minutes
"However the biggest change that's coming with ASP.NET vNext is severing its ties with System.Web and moving to the new Owin hosting model..."
Furthermore...
"...allows you to take any web host such as IIS or self-hosting within an console app"

What is Owin? What is it's relationship to Asp.Net?

Can anyone give me a brief description of owin?
What is its relationship between asp.net mvc external log in?
and relation to Microsoft.Owin.Security.Google?
You can read about OWIN at http://owin.org. That should give you some understanding about the structure and interface of the framework and how it is used to separate any midware, e.g. MVC from a concrete server process e.g. IIS. Microsoft wants to adopt this framework/interface to make middleware like MVC available on more systems. Currently (MVC5) MVC is not yet a OWIN middleware, but parts like authentication already are. So this is why you have some assembly like Microsoft.Owin.Security.Google referenced in your project.

How to Implement OWIN and Katana in MVC 5Application

i upgrade my application from mvc4 to mvc5. i am using Entity Framework code first approach in my application. i am confuse about OWIN and Katana. how i implement these concept in my web mvc5 application. please guide me.
Thank you
ASP.NET MVC was not designed to work with OWIN. It's the ASP.NET Web API and SignalR that were built for OWIN and provide specific host. So you cannot implement those concepts in an ASP.NET MVC application.
So far the only MVC framweworks I have found that support OWIN are NancyFx or FubuMVC.

Why does ASP.NET MVC use Code Access Security?

I'm a little curious about why CAS is being extensively used in MVC. A lot of it seems to be suppressedmessages too. I may have misunderstood it but I always thought you didn't need to use CAS if you fully trusted the code/server you used.
CAS is not used directly by MVC since the MVC binary is security transparent. If you're looking through the source and are curious, the [SuppressMessage] attributes are just there to tell FxCop not to worry about link demands.

nhibernate burrow and ASP.Net MVC

I using nhibernate burrow for long conversation. I am preparing to migrate project to ASP.NET MVC, but burrow doesn't support MVC.
I trying to change Burrow to work via MVC. But I have no idea what is the best way to do this. I am not sure that HTTP Module is a good way. I think about ActionFilters to initialize conversation.
you might wanna look here
http://blog.pragmasql.com/post/NHibernate-20-Sample-Project-using-NHibernateBurrow-contribution.aspx
for a project that uses nhibernate burrow + asp.net mvc

Resources