asp.net core 配置 iis

 web.config 需要补充一个配置

<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".ExpressSystem.dll" stdoutLogEnabled="false" stdoutLogFile=".logsstdout" />
</system.webServer>
</location>

对应 arguments 改成你的项目dll。

这样可以解决4.3错误

前面2个步骤,要下载安装对应的net core的 host版本。确保 iis的模块有对应的aspnetcore module

发布的项目的时候 要选择对应iis。 文件夹发布

原文地址:https://www.cnblogs.com/zxs-onestar/p/12759634.html