我正在尝试在IIS中部署网络Core webApi。如图所示,我已配置了IIS,但未运行WEBAPI。我也收到错误500.19,因为它也出现在图像中。在同一台计算机上,我从可执行文件或带有dotnet的dll运行Web api,它可以正常运行,下面我为您提供了一些参考图像和web.config代码。希望您能提供帮助,非常感谢!!
WEBCONFIG >>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!-- To customize the asp.net core module uncomment and edit the following section.
For more info see https://go.microsoft.com/fwlink/?linkid=838655 -->
<system.webServer>
<handlers>
<remove name="aspNetCore" />
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\YangSoft.WebAPI.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess">
<environmentVariables>
<environmentVariable name="ASPNETCORE_HTTPS_PORT" value="44320" />
<environmentVariable name="COMPLUS_ForceENC" value="1" />
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
</environmentVariables>
</aspNetCore>
</system.webServer>
</configuration>
<!--ProjectGuid: e014a839-088c-484e-9bda-6a2ce51f0de6-->
我在这里和Google上冲浪很长时间,我真的找不到解决方法。
IMgs:
https://ibb.co/N3h59kQ
https://ibb.co/LRdSktk
https://ibb.co/rvYn8Z8
https://ibb.co/vsTMm3T
https://ibb.co/VjwgyMv
https://ibb.co/ykdGZpm
https://ibb.co/Q8RB96W