Angular 角度IIS部署-‘;src&x2019;属性<;脚本>;元素不是有效的URI:
我正在尝试将Angular 7应用程序部署到IIS。应用程序位于子目录中。我在这个问题上引用了这篇优秀的文章。虽然它似乎比我以前的尝试工作得更好,但页面无法加载,并显示以下错误消息:Angular 角度IIS部署-‘;src&x2019;属性<;脚本>;元素不是有效的URI:,angular,Angular,我正在尝试将Angular 7应用程序部署到IIS。应用程序位于子目录中。我在这个问题上引用了这篇优秀的文章。虽然它似乎比我以前的尝试工作得更好,但页面无法加载,并显示以下错误消息: ‘src’ attribute of <script> element is not a valid URI: “runtime.26209474bfa8dc87a77c.js” index.html:14:1 ‘src’ attribute of <script> element is n
‘src’ attribute of <script> element is not a valid URI: “runtime.26209474bfa8dc87a77c.js” index.html:14:1
‘src’ attribute of <script> element is not a valid URI: “es2015-polyfills.c5dd28b362270c767b34.js” index.html:14:1
‘src’ attribute of <script> element is not a valid URI: “polyfills.8bbb231b43165d65d357.js” index.html:14:1
‘src’ attribute of <script> element is not a valid URI: “main.13a837ca016c8bacb03a.js” index.html:14:1
如果您有任何建议,我们将不胜感激。显示在prod模式下生成的index.html的内容显示在prod模式下生成的index.html的内容
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Angular Routes" 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="./index.html" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>