Closed nologinatgit closed 6 years ago
Does it mean that I can't create a .Net Core project with self hosting?
No, it just means that you can't use Nancy.Hosting.Self
. It's based on HttpListener
, which is Windows-specific and HTTP.SYS. If you want to use self-hosting on .NET Core, you should use Kestrel. See https://github.com/NancyFx/Nancy/tree/master/samples/Nancy.Demo.Hosting.Kestrel
The Kestrel demo is in .Net Framework, not Core. An example in Core is the Owin demo here:
https://github.com/NancyFx/Nancy/tree/master/samples/Nancy.Demo.Hosting.Owin
Description
I have created an empty .Net Core ASP.NET project and tried to use Nancy as a self hosted platform. I added the following NuGet packages:
Steps to Reproduce
I created the following code:
I start and works yet I have a warning that says:
Does it mean that I can't create a .Net Core project with self hosting?
System Configuration
Nancy version: 2.0.0-clinteastwood
Nancy host
.NET Framework version: .Net Core 2.0