发布我的Web API后出现以下错误:
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Detailed Error Information:
Module IIS Web Core
Notification Unknown
Handler Not yet determined
Error Code 0x8007000d
Config Error
Config File \\?\C:\inetpub\inspectpointapiv1\web.config
Requested URL http://localhost:81/
Physical Path
Logon Method Not yet determined
Logon User Not yet determined
Config Source:
-1:
0:
Web.config文件如下所示:
<?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="dotnet" arguments=".\InspectPointApi.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</location>
</configuration>
这在其他计算机上也可以使用,但是该计算机似乎在抱怨AspNetCore模块。该应用程序可在IIS Express中运行,但是当我在同一台计算机上发布到IIS时,会收到错误消息。