iis - IIS 抛出配置文件错误 - 尝试部署 netcore2.0 应用程序时出现 0x8007000d
问题描述
我正在尝试将 netcore2.0 MVC 应用程序部署到 IIS 并不断收到上述错误。文件权限设置正确,我检查了运行时是否已下载。错误如下:
Module
IIS Web Core
Notification
Unknown
Handler
Not yet determined
Error Code
0x8007000d
Config Error
Config File
\\?\E:\Dev\test-deploy\web.config
Requested URL
http://localhost:4231/
Physical Path
Logon Method
Not yet determined
Logon User
Not yet determined
以下是我的配置文件(由 vs 代码生成):
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath=".\Coneckt.Web.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
</system.webServer>
</configuration>
<!--ProjectGuid: 2833ed36-9a18-47b6-8f33-8998356796d9-->
解决方案
出现此错误是因为 ApplicationHost.config 或 Web.config 文件包含格式错误的 XML 元素,您需要从 ApplicationHost.config 或 Web.config 文件中删除格式错误的 XML 元素。
您还可以参考此链接了解如何在 IIS 上部署 ASP.NET Core:Host ASP.NET Core on Windows with IIS。
推荐阅读
- spring - 可以将 Spring 指标从 Micrometer 导出到 Kafka 吗?
- javascript - 如何在使用 jquery/javascript 时打破行尾?
我有一张桌子:
- html - 具有较低值的 z-index 仍然出现在其他 div 上
- php - PHP - 获取已选中复选框的所有值并将其组合在一个数组中
- apache - 在 IE nort 工作时强制将 http 重定向到 https
- hybris - Hybris 后台定制
- php - GET 请求正在工作,仅在 cron 作业中使用 CURL 的 POST 请求未执行
- javascript - 如何使用 json 数据使 bootstrap 4 下拉
- reactjs - 从 React-Native 中的 hashMap 获取密钥
- ruby-on-rails - 从 Elastic Beanstalk 上的 credstash 设置环境变量