无法在 windows 服务器 2012 r2 中加载 libuv?
Unable to load libuv in windows server 2012 r2?
在 visual studio 代码中,我在命令行面板中发出 dnx kestrel。
但是我遇到了这样的错误
info : [Microsoft.Framework.DependencyInjection.DataProtectionServices] User
profile is available. Using 'C:\Users\myaccount\AppData\Local\ASP.NET\DataProt
ection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
System.InvalidOperationException: Unable to load libuv.
at Microsoft.AspNet.Server.Kestrel.Networking.Libuv.Load(String dllToLoad)
at Microsoft.AspNet.Server.Kestrel.KestrelEngine..ctor(ILibraryManager librar
yManager, IApplicationShutdown appShutdownService)
at Microsoft.AspNet.Server.Kestrel.ServerFactory.Start(IServerInformation ser
verInformation, Func`2 application)
at Microsoft.AspNet.Hosting.Internal.HostingEngine.Start()
at Microsoft.AspNet.Hosting.Program.Main(String[] args)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly,
String[] args, IServiceProvider serviceProvider)
at Microsoft.Dnx.ApplicationHost.Program.ExecuteMain(DefaultHost host, String
applicationName, String[] args)
at Microsoft.Dnx.ApplicationHost.Program.Main(String[] args)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly,
String[] args, IServiceProvider serviceProvider)
at Microsoft.Dnx.Host.Bootstrapper.RunAsync(List`1 args, IRuntimeEnvironment
env, FrameworkName targetFramework)
at Microsoft.Dnx.Host.RuntimeBootstrapper.ExecuteAsync(String[] args, Framewo
rkName targetFramework)
at Microsoft.Dnx.Host.RuntimeBootstrapper.Execute(String[] args, FrameworkNam
e targetFramework)
Press any key to continue . . .
我该如何解决这个问题?
谢谢
Why do you want to use kestrel on win2012 ? You'd better use IIS or AspNet selfhost instead. Kestrel should be use on Linux or Mac
哦,有一种叫做自托管的东西吗?感谢 @agua from mars 提供的信息
Kestrel 使用 libuv 异步 I/O 库。因此,您可以安装它以使用 Kestrel 作为 Web 服务器,或者您可以使用 dnx web 启动您的应用程序,其中 web 是 project.json.
中的命令
"commands": {
"kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --config hosting.ini",
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --config hosting.ini"}
在 visual studio 代码中,我在命令行面板中发出 dnx kestrel。 但是我遇到了这样的错误
info : [Microsoft.Framework.DependencyInjection.DataProtectionServices] User
profile is available. Using 'C:\Users\myaccount\AppData\Local\ASP.NET\DataProt
ection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
System.InvalidOperationException: Unable to load libuv.
at Microsoft.AspNet.Server.Kestrel.Networking.Libuv.Load(String dllToLoad)
at Microsoft.AspNet.Server.Kestrel.KestrelEngine..ctor(ILibraryManager librar
yManager, IApplicationShutdown appShutdownService)
at Microsoft.AspNet.Server.Kestrel.ServerFactory.Start(IServerInformation ser
verInformation, Func`2 application)
at Microsoft.AspNet.Hosting.Internal.HostingEngine.Start()
at Microsoft.AspNet.Hosting.Program.Main(String[] args)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly,
String[] args, IServiceProvider serviceProvider)
at Microsoft.Dnx.ApplicationHost.Program.ExecuteMain(DefaultHost host, String
applicationName, String[] args)
at Microsoft.Dnx.ApplicationHost.Program.Main(String[] args)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly,
String[] args, IServiceProvider serviceProvider)
at Microsoft.Dnx.Host.Bootstrapper.RunAsync(List`1 args, IRuntimeEnvironment
env, FrameworkName targetFramework)
at Microsoft.Dnx.Host.RuntimeBootstrapper.ExecuteAsync(String[] args, Framewo
rkName targetFramework)
at Microsoft.Dnx.Host.RuntimeBootstrapper.Execute(String[] args, FrameworkNam
e targetFramework)
Press any key to continue . . .
我该如何解决这个问题? 谢谢
Why do you want to use kestrel on win2012 ? You'd better use IIS or AspNet selfhost instead. Kestrel should be use on Linux or Mac
哦,有一种叫做自托管的东西吗?感谢 @agua from mars 提供的信息
Kestrel 使用 libuv 异步 I/O 库。因此,您可以安装它以使用 Kestrel 作为 Web 服务器,或者您可以使用 dnx web 启动您的应用程序,其中 web 是 project.json.
中的命令"commands": {
"kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --config hosting.ini",
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --config hosting.ini"}