由于无法加载aspnetcore.dll,IIS 10应用程序池不断停止 [英] IIS 10 App Pool Keeps Stopping due to aspnetcore.dll failed to load
问题描述
我在IIS 10上本地托管了一个asp.net core 2.0.由于某些原因,DefaultAppPool在我访问托管网站后会立即停止. 而且我收到HTTP错误503.服务不可用.
I have an asp.net core 2.0 hosted locally on IIS 10. For some reason DefaultAppPool keeps stopping as soon as I hit the hosted website. And I am getting HTTP Error 503. The service is unavailable.
在事件日志中,我看到以下错误;
In event logs I see following error;
模块DLL C:\ WINDOWS \ system32 \ inetsrv \ aspnetcore.dll失败 加载.数据就是错误.
The Module DLL C:\WINDOWS\system32\inetsrv\aspnetcore.dll failed to load. The data is the error.
当我检查路径C:\WINDOWS\system32\inetsrv\
时,我没有看到aspnetcore.dll
存在.应该在那里吗?如果是,.net核心安装exe文件不应复制吗?
When I check the path C:\WINDOWS\system32\inetsrv\
I do not see aspnetcore.dll
exists. Should it be there? If yes, .net core installation exe shouldn't be copy it?
以下是一些信息;
我尝试了什么但没有成功?
What I tried, and did not worked?
- 对IIS AppPool进行故障排除崩溃
- 已卸载的.net core并已重新安装.
- 将应用程序池标识更改为网络服务等.
有什么主意我可以解决这个问题吗?
Any idea how I can fix this?
推荐答案
要在IIS中托管.Net Core应用程序,应用程序池的.Net CLR版本应为无托管代码",如下面的屏幕快照所示.如果在下拉菜单中没有看到无托管代码"选项,则需要安装.Net Core Hosting Bundle.
For hosting .Net Core applications in IIS, .Net CLR Version of application pool should be No Managed Code as shown in below screenshot. If you don't see "No Managed Code" option in in dropdown then you need to install .Net Core Hosting Bundle.
这篇关于由于无法加载aspnetcore.dll,IIS 10应用程序池不断停止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!