我已经创建了新的项目web.net核心,没有进行任何更改,并使用了创建的默认文件。我可以使用调试模式成功运行此程序,但是如果我要在IIS上发布它,则会给我错误:HTTP错误500.19-内部服务器错误,这是错误详细信息:
The requested page cannot be accessed because the related configuration data for the page is invalid.
错误代码:
0x8007000d
我已经尝试修改web.config以将processPath指向我的dotnet位置,但是它仍然具有相同的错误结果:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="C:\Program Files\dotnet\dotnet.exe" arguments=".\WebApplication1.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</location>
</configuration>
<!--ProjectGuid: d4e1dda9-f8ba-4752-883d-43c86faa3c60-->
我不确定这是否与我的IIS安装程序配置有关。如果遇到任何建议/意见。 TIA
检查您的网站正在哪个应用程序池标识下运行。检查您可以按照以下步骤操作: