【发布时间】:2021-04-22 03:31:38
【问题描述】:
我在自己的服务器上安装了 WebAPI,但在浏览它时不断收到以下错误:
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
我使用 Dot Net 5.0 WebAPI 进行设置,并在发布到目录后将其安装在最新版本的 IIS 中。
这是我的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>
<aspNetCore processPath="dotnet" arguments=".\akmazio-api.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
</system.webServer>
</location>
</configuration>
<!--ProjectGuid: 3b944703-a011-4408-9581-8c919ba4ed0e-->
对可能导致此问题的原因以及如何解决它有任何想法吗?
【问题讨论】:
-
在本地访问该服务器上的页面,以便您可以看到带有 8 位错误代码的详细错误页面,例如
8xxxxxxx。这可以告诉您哪些现有讨论与您遇到的问题相匹配。 -
@LexLi 0x8007000d
-
@LexLi 在这里查看我的答案:stackoverflow.com/a/67202366/1694767
标签: windows iis asp.net-web-api