dennisroche / TopShelf.Owin

Topshelf.Owin provides extensions to configure a self-hosted OWIN instance along with your service class.
MIT License
31 stars 9 forks source link

Allow access to the IAppBuilder #2

Closed mausch closed 9 years ago

dennisroche commented 9 years ago

@mausch why do you need access to the IAppBuilder? I'm happy to merge this, just would like to see an example of the usage so that I can update the readme.

mausch commented 9 years ago

The current code only integrates WebAPI through OWIN, but not OWIN in general. If you want to integrate any other web framework (e.g. Nancy) or middleware, you need access to the IAppBuilder (see for example https://github.com/NancyFx/Nancy/wiki/Hosting-nancy-with-owin#katana---aspnet-host ).

In my particular case, I wrote a web console for the Quartz.NET scheduler that exposes an OWIN "middleware" function (I so dislike that term) and to bind it with the Microsoft OWIN infrastructure I need to pass that function to the IAppBuilder instance.

dennisroche commented 9 years ago

@mausch thanks for the extra information. I'll merge this soon, just setting up AppVeyor CI to build and publish the Nuget package.