When you deploy an ASP. NET core project to IIS slightly different than before, record several points:
One, the download installs the Aspnetcoremodule module, it contains in the. NET Core Windows Server Hosting Bundle, this link may not be up to date, the official document has this link, can find in the indicated location.
After the installation, you will find that there are a number of modules:
Then restart IIS. If the following error still occurs:
HTTP Error 502.5 - Process FailureCommon causes of this issue:The application process failed to startThe application process started but then stoppedThe application process started but failed to listen on the configured port
可能是iis没有重启成功,在cmd执行iisreset命令重启可以解决。当时我就是直接在iis面板点重启,后面用命令方式重启就成了,中间还安装了 VC_redist.x64 ,也不知道管用不管用,这家伙我是在vs安装包里面找到的,就不用下载了。更多错误解决办法请看这里。
二、修改.NET CLR版本为无托管代码,iis只是转发请求,所以不用代码托管,具体还是看官方文档
三、到这里应该差不多了,具体的原理流程什么的官方文档也很详细了,接下来就可以开始愉快的爬坑之旅了。
ASP. NET core deployment to IIS