我已经将我angular9应用程序转换为Angular Universal,现在我想部署在IIS上,当我添加一个站点时,server.This工作正常,但是当我在IIS中添加一个应用程序时,这会显示以下错误。图片在这里。1:https://i.stack.imgur.com/ksWw2.png 2:https://i.stack.imgur.com/Jk27S.png
发布于 2020-07-17 16:03:02
显然,您正在为您的应用程序运行不正确的重写规则。当规则不能重写您的无扩展URL时,IIS静态文件处理程序将处理它。
如果您启用了失败请求跟踪,那么您可能不会注意到

其输入匹配为空“”,而不是/appraisal。
因此,如果将main.js放在评估/服务器/中
那就试试这个规则吧
<rule name="rewrite rule">
<match url=".*" />
<action type="Rewrite" url="server/main.js" />
<conditions>
<add input="{URL}" pattern="^/appraisal/*" />
</conditions>
</rule>https://stackoverflow.com/questions/62933630
复制相似问题