I want to write an self-hosted web application usign OWIN / Katana and Nancy. I understand the concept of OWIN and have figured out many things about Katana and Nancy. But I don't understand how can I self-host my application without a console.
Like every tutorial / code examples / documentations I can find are like the following example
using (WebApp.Start<Startup>(url))
{
Console.ReadLine();
}
But I don't want to run a console application later. I want to run a "hidden" app - probably a windows service.
So I hope you already got what my question is. But I'll try to explain it again in other words: How do I prevent that my application stops before I want to stop it?
Imagine I would do this:
private static void Main(string[] args)
{
var url = "http://+:8080";
var app = WebApp.Start<OwinStartup>(url);
}
The application would - obviously - immediately end.
Okay actually the Nancy part of my question isn't that important. I've just added it to explain my complete situation.