【问题标题】:Error HTTP 500.19 - Internal Server Error while deploying angular app in IIS错误 HTTP 500.19 - 在 IIS 中部署 Angular 应用程序时出现内部服务器错误
【发布时间】:2021-08-27 09:34:12
【问题描述】:

在 IIS 上部署 Angular 应用时遇到问题,我添加了配置文件“web.config”,并授予用户权限:

<?xml version = "1.0" encoding = "UTF-8" ?>
<configuration>
    <system.webServer>
      <rewrite>
        <rules>
          <rule name="Angular Routes" stopProcessing="true">
            <match url=".*" />
            <conditions logicalGrouping="MatchAll">
              <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
              <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
            </conditions>
            <action type="Rewrite" url="/" />
          </rule>
        </rules>
      </rewrite>
    </system.webServer>
</configuration>

但我不断收到此错误:

如果我删除 web.config 文件它可以工作但不完全,我仍然会在 Api 调用和重新加载页面时收到 404 错误。

在此编辑:

其他信息:

这是我在删除 we.config 时遇到的错误 404 错误:

这是 app.config.json:

{
  "apiUrl": "my_back_end_deplyment_Url",
  "dashboardUrl": "/",
  "theme": "theme-green",
  "notificationRefreshInterval": 900000,
  "maxNotificationToTake": 10,
  "useNotifications": false,
  "useDashboard": false,
  "intervalConnectionCheck": 300000
}

我是不是搞砸了其他事情(也许将 Angular 应用程序链接到我的 .NET Core 应用程序)?

【问题讨论】:

标签: angular iis deployment web-deployment http-status-code-500


【解决方案1】:

这个过程似乎需要UrlReWrite,由于公司的限制(安全问题),我一开始无法安装它。安装后就正常了。

【讨论】:

    猜你喜欢
    • 2015-09-20
    • 1970-01-01
    • 2014-05-06
    • 1970-01-01
    • 2018-05-24
    • 2020-08-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多