The commands for K Web are as follows:
"Web": "Microsoft.AspNet.Hosting--server Microsoft.AspNet.Server.WebListener--server.urls http://localhost:8001"
Where Microsoft.AspNet.Hosting is Owin Host, with K Kestrel is the same. Microsoft.AspNet.Server.WebListener is Owin Server.
To run K Web, you need to add a reference to Project.json:
"Microsoft.Framework.DependencyInjection": "1.0.0-beta2", "MICROSOFT.FRAMEWORK.DEPENDENCYINJECTION.AUTOFAC": " 1.0.0-beta3-10754 "
Otherwise, an error will occur:
Missing Method Microsoft.framework.dependencyinjection.servicecollectionextensions::addcontextaccessor
The final error that occurs with K Web is:
System.DllNotFoundException:httpapi.dll
So what's the reason?
Microsoft.AspNet.Server.WebListener although a. NET managed program, is called by the Microsoft.AspNet.Server.WebListener.ServerFactory.Initialize. But AspNet.Server.WebListener called in Microsoft.AspNet.Server.WebListener.ServerFactory.Initialize . Microsoft.Net.Http.Server.WebListener , and an unmanaged httpapi.dll is used in the Http.Server.WebListener constructor:
// Microsoft.Net.Http.Server.WebListener Public Weblistener (Iloggerfactory factory) { if (! UnsafeNclNativeMethods.HttpApi.Supported) { thrownew PlatformNotSupportedException (); }}
The problem is here.
Why can't I run an ASP. NET 5 program on my Mac with K Web