当我尝试开始时:
WebApp.Start<SrvcHst>(new StartOptions { Port = 9956,
ServerFactory = "Microsoft.Owin.Host.HttpListener" });
我得到以下异常。可能是根本原因?
System.MissingMemberException was caught
HResult=-2146233070
Message=The server factory could not be located for the given input: Microsoft.Owin.Host.HttpListener
Source=Microsoft.Owin.Hosting
StackTrace:
at Microsoft.Owin.Hosting.Engine.HostingEngine.ResolveServerFactory(StartContext context)
at Microsoft.Owin.Hosting.Engine.HostingEngine.Start(StartContext context)
at Microsoft.Owin.Hosting.Starter.DirectHostingStarter.Start(StartOptions options)
at Microsoft.Owin.Hosting.Starter.HostingStarter.Start(StartOptions options)
at Microsoft.Owin.Hosting.WebApp.StartImplementation(IServiceProvider services, StartOptions options)
at Microsoft.Owin.Hosting.WebApp.Start(StartOptions options)
at Microsoft.Owin.Hosting.WebApp.Start[TStartup](StartOptions options)
Microsoft.Owin.Host.HttpListener.dll
与您的应用一起部署在主程序集旁边?或者,您可以将其添加为对此项目的引用,并将其复制到bin目录。