如何在 IIS 中构建和配置 angular12 子应用程序?
How to build and configure an angular 12 sub-application in IIS?
我的 iis 设置如下所示:
Cool App 是一个 umbrella/container 应用程序,用作午餐 sub/children 应用程序的仪表板。 “童酷应用”是在 visual studio 中使用 .net 5 和 Angular 12 创建的。将应用程序移动到具有 <base href="./">
index.html base ref 的“域网站”的子项实际上可行,但在过去几天将其作为“Cool App”的子项移动已被证明是棘手的。
尝试过:
ng build --configuration production --base-href /child cool app/
Index.html: <base href="/">
Index.html: <base href="">
Index.html: <base href="/child cool app/">
Index.html: <base href="./">
这 2 个项目位于完全不同的文件夹中,并在 iis 中通过它们的物理路径进行引用。不断收到“找不到此本地主机页面”
谢谢...
出于某种原因,它只是说工作。以下配置有效:
在angular.jsonarchitect\build\options\baseref=
"/cool_app/cool_child_app/"
从 Visual Studio (2019)
开始定期发布
IIS 在下面创建应用程序 (cool_app\cool_child_app) 并带有自己的应用程序
池
IIS,指向你发布的文件夹
我的 iis 设置如下所示:
Cool App 是一个 umbrella/container 应用程序,用作午餐 sub/children 应用程序的仪表板。 “童酷应用”是在 visual studio 中使用 .net 5 和 Angular 12 创建的。将应用程序移动到具有 <base href="./">
index.html base ref 的“域网站”的子项实际上可行,但在过去几天将其作为“Cool App”的子项移动已被证明是棘手的。
尝试过:
ng build --configuration production --base-href /child cool app/
Index.html: <base href="/">
Index.html: <base href="">
Index.html: <base href="/child cool app/">
Index.html: <base href="./">
这 2 个项目位于完全不同的文件夹中,并在 iis 中通过它们的物理路径进行引用。不断收到“找不到此本地主机页面”
谢谢...
出于某种原因,它只是说工作。以下配置有效:
在angular.jsonarchitect\build\options\baseref= "/cool_app/cool_child_app/"
从 Visual Studio (2019)
开始定期发布IIS 在下面创建应用程序 (cool_app\cool_child_app) 并带有自己的应用程序 池
IIS,指向你发布的文件夹