问题描述
我创建了两个ASP.NET Core Web应用程序-仅API模板:
I created two ASP.NET Core web applications - just API templates:
- ASP.NET Core 2.2
- ASP.NET Core 3.0
将这些应用程序部署到最新的Windows Server 2016(3.0 Runtime&Hosting Bundle). ASP.NET Core 2.2可以正常工作,没有任何问题,但是ASP.NET Core 3.0从下面的图片中给了我这个错误.
Deployed these applications to the Windows Server 2016 with latest (3.0 Runtime & Hosting Bundle). ASP.NET Core 2.2 works correctly without any problems, but ASP.NET Core 3.0 gives me this error from image below.
在事件查看器中,每次部署或尝试启动3.0应用程序时,我都会发现错误:
In event viewer I found error every time when I deploy or try to start 3.0 application:
我只是复制了目录路径,并在命令提示符下添加了可执行文件,此命令将打开localhost侦听器:
I just copied directory path with adding executable file to the command prompt, and this command opens localhost listener:
> C:\Inetpub\vhosts\webapp.com\httpdocs\WebApp.exe
然后,我可以通过本地主机和端口直接在服务器上访问webapp
.我也尝试更改目录权限,但没有解决问题.
Then I can access to the webapp
directly on server over localhost and port. I tried also to change directory permission but I didn't fix the issue.
推荐答案
对我来说,我特别解决了此问题,方法是在应用程序中添加web.config并将 AspNetCoreModuleV2 替换为 AspNetCoreModule ,但这不是完美的解决方案.
For me specifically I fixed this issue with adding web.config in application and replacing AspNetCoreModuleV2 to AspNetCoreModule, but this is not perfect solution.
另一种解决方案是将应用程序部署为自包含.
Another solution is deploying application as Self-Contained.
这篇关于AspNetCore 3.0-HTTP错误500.0-ANCM进程内处理程序加载失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!