我已经创建了一个干净的Angular 6 App。我将以下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>
Run Code Online (Sandbox Code Playgroud)
我在angular.json文件的资产部分中添加了“ src / web.config”。我已将Web应用程序上的节点版本更新为10.6。
当我将应用程序部署并导航到站点时,我得到以下信息:您无权查看此目录或页面。
我遵循以下示例:https : //itnext.io/easy-way-to-deploy-a-angular-5-application-to-azure-web-app-using-vsts-pipelines-4a288b9deae1
有什么建议么?
我花了很长时间才弄清楚这一点。希望对您有所帮助。
归档时间: |
|
查看次数: |
1254 次 |
最近记录: |