繁体   English   中英

HTTP错误500.19 - 托管Angular 4应用程序后出现内部服务器错误

[英]HTTP Error 500.19 - Internal Server Error after hosting the Angular 4 app

我在服务器系统中托管了我的Angular 4应用程序,最初我遇到了404错误所以我在生产构建文件夹中添加了一个web.config文件。现在我收到了这个错误。

但是应用程序在我的本地系统上正常运行,它会抛出服务器系统的错误。我尝试了一些在win7上运行的其他系统,win10但是它没有运行总是显示500.19的错误。

我花了好几个小时来解决这个问题,在stackoverflow中引用了与我的帖子相关的所有帖子,但没有任何工作。

任何人都可以帮我解决这个问题。

错误页面:

在此输入图像描述

Web.Config中

<configuration>
<system.webServer>
    <rewrite>
      <rules>
        <rule name="AngularJS Routes" stopProcessing="true">
          <match url=".*" />
          <conditions logicalGrouping="MatchAll">
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
            <add input="{REQUEST_URI}" pattern="^/(api)" negate="true" />
          </conditions>
          <action type="Rewrite" url="/eCommerceWebsite" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration>

您的IIS缺少URL重写模块。

您可以从microsoft下载并安装它: https//www.iis.net/downloads/microsoft/url-rewrite

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM