Vin*_*nil 4 iis hosting typescript iis-10 angular
我在服务器系统中托管了我的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>
Run Code Online (Sandbox Code Playgroud)
pen*_*han 11
您的IIS缺少URL重写模块.
您可以从microsoft下载并安装它:https://www.iis.net/downloads/microsoft/url-rewrite
| 归档时间: |
|
| 查看次数: |
3131 次 |
| 最近记录: |