Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between using Owinhost.exe to run an OWIN web service or a Console App

Tags:

c#

owin

I´m starting developing a new web application and looking at using OWIN. One thing that I can´t work out from any documentation is what is the difference between creating the C# application as a Console App and starting it running from its exe file, or to create the project as a Class Library / dll, and using OwinHost.exe to start it up.

Does running Owinhost.exe to start the process give you anything much over running it as a console app?

like image 857
Martin Cooper Avatar asked Jan 26 '14 08:01

Martin Cooper


1 Answers

One of the components included in the Microsoft OWIN components is the lightweight, console-based OwinHost.exe. This host finds the user’s startup code and uses it to build an OWIN pipeline; it then uses an HttpListener-based server to receive requests and push them through the OWIN pipeline. OwinHost is a nice, lightweight option for development-time hosting – particularly if the application will ultimately be deployed into a self-hosted environment.

Source http://blogs.msdn.com/b/webdev/archive/2013/09/11/visual-studio-2013-custom-web-servers-and-owinhost-exe.aspx

In other words you should use OwinHost for development and a windows service or console app for production.

like image 191
Stefan P. Avatar answered Sep 22 '22 12:09

Stefan P.