1. 安装 .Net5 RunTime
2. 应用程序池设置为无托管代码
3. 网站 web.config 配置如下节点
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<!--hostingModel="inprocess" 代表进程内托管-->
<aspNetCore processPath="dotnet" arguments=".\Web_WebService.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</location>
</configuration>