【发布时间】:2019-02-18 23:59:32
【问题描述】:
我创建了一个干净的 Angular 6 应用程序。我将以下 web.config 添加到 src 文件夹:
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Angular" 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>
我在 angular.json 文件的资产部分添加了“src/web.config”。我已将 web 应用上的节点版本更新为 10.6。
当我将应用程序和导航部署到站点时,我得到以下信息:您无权查看此目录或页面。
有什么建议吗?
【问题讨论】: