我已经将我的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>