Friday, April 17, 2015

OWIN error: OWIN middleware is not invoked

I’m in the middle of switching between the ASP.NET WIF implementation and the OWIN WIF implementation. I had some unexpected issues, but the positive thing is I learned a lot about WIF and OWIN Glimlach.

I had an existing project where I wanted to start using OWIN. So I included the OWIN NuGet package and added a startup class.

Afterwards I started my application. But no luck, the breakpoint inside the Startup class was never hit?!

What did I do wrong?

OWIN is just a specification and is host independent. If you want to run it on a specific host, you have to add some extra NuGet packages. In my case, I wanted to run OWIN on IIS inside the ASP.NET request pipeline. Therefore I had to add the Microsoft.Owin.Host.SystemWeb NuGet Package.

After doing that, my breakpoint was hit and my OWIN middleware was called…

More information:

No comments: