- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我们有一个带有 IIS 网站和下面的 IIS Web 应用程序的网络服务器。 Web 应用程序的根是: http://website/webapplication/ 。部署后,我在浏览器中收到以下错误:
http://website/app/app.component.html 404 (Not Found)
app/app.component.html 404 (Not Found)
我的组件:
@Component({
selector: "app",
templateUrl: "./app/app.component.html"
})
文件app.component.html确实不存在于/app/app.component.html下,但它确实存在于:/webapplication/app/app.component.html .
因此,我的结论是 Angular 仅在网站的根目录下才有效。在 html header 中,我将标记设置为:<base href="/webapplication/">
,但这没有帮助。
这似乎是一个正常的设置,我不敢相信 Angular 中的模板解析失败了,我一定是遗漏了一些东西......有人知道这个的解决方案吗?
最佳答案
我无法使用网络上关于解决此问题的大部分建议,我不知道为什么。我玩弄了 settings util 我让它工作了。这是我使用的:
网络配置:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<directoryBrowse enabled="true" />
<rewrite>
<rules>
<rule name="AngularJS 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="/myapp/index.html" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
我的根 index.html 文件:
<base href="./"> <---- make sure you have the dot in there!
关于Angular 和 IIS WebApplication(或虚拟目录),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38565102/
首先是一些背景知识。 2012 年底,我们将 vs2008 解决方案迁移到 vs2010,但我们仍然以 .NET 3.5 为目标。 (我只知道这里最新最好的!) 我们的设置没有遇到任何问题,直到几周前
我将 WCF 服务安装到 IIS。安装程序创建虚拟目录并将其转换为 Web 应用程序。卸载删除所有但 Web 应用程序名称保留在 IIS 站点下。如何删除它?有代码
当我将服务器 checkin 构建服务器(使用 TFS)时遇到问题,但由于某种原因,返回下一个错误: Exception Message: MSBuild error 1 has ended this
我正在设置发布到相对路径以进行本地测试(尤其是 xml 配置转换)。每个开发人员都有自己的 checkout 项目路径,我想设置一个与机器/环境无关的发布。 发布对话框不提示其中允许的任何变量或通配符
所以情况是这样的:我最近从一位离开公司的前同事手中接过了 Vaadin8 WebApplication 的职责,这意味着我现在将负责维护以及开发客户可能想要的任何增强功能。该应用程序基本上显示一个表单
我的任务是在 web 应用程序中保存并稍后读取文件中的一些任意数据。我不能使用硬编码的系统路径,因为我的 webapp 的多个实例可能会在同一台服务器上启动。我有一些限制,不能使用数据库来管理它。所以
好吧,我正在尝试用 Java 构建一个 Web 应用程序,每次有人在地址中发出 http 请求时都会启动一个线程。这是一个很好的做法?能行吗??优势还是劣势?工作在下面并使用一个 spring 示例,
我搜索了很多有关 Website 和 WebApplication 之间区别的信息,但没有得到明确的答案。 连我看了之后都更加困惑了。 最佳答案 来自维基百科: 网络应用 In software en
环境:在 Windows Server 2012 VM 上运行的 TFS 2012 构建代理。 .Net 4.0/.Net 4.5 安装。 Windows SDK ( http://msdn.micr
环境:在 Windows Server 2012 VM 上运行的 TFS 2012 构建代理。 .Net 4.0/.Net 4.5 安装。 Windows SDK ( http://msdn.micr
简而言之: [当我尝试创建新的 JDBC 连接池时,glassfish 管理控制台出现问题] 有人可以帮我解决这个问题吗: 首先,我想在 Netbeans IDE 8.1 上开发一个 JSF 应用程序
我成功部署了我的 web 应用程序,索引页面运行良好,但是当我尝试导航到登录页面时出现如下错误消息...... org.apache.jasper.JasperException: The absol
我有一个使用 Tomcat 5.5.15 提供的下载服务。它是通过在 $TOMCAT_HOME/conf/Catalina/localhost 中添加一个 XML 文件来创建的。例如 download
我遵循此 http://www.ibm.com/developerworks/library/wa-aj-tomcat/ 中的确切步骤,并且我正确地包含了所有 jar (我相信)。而且我仍然遇到如下错
我想在我的网站中使用规范网址。我在互联网上阅读了一些关于它的内容,但我正在寻找一种解决方案,它会自动为我生成规范运行时并将其添加到返回浏览器的 html 代码中。 我已经在 Internet 上找到了
我们有一个带有 IIS 网站和下面的 IIS Web 应用程序的网络服务器。 Web 应用程序的根是: http://website/webapplication/ 。部署后,我在浏览器中收到以下错误
本文整理了Java中org.eclipse.jst.j2ee.webapplication.WebApp类的一些代码示例,展示了WebApp类的具体用法。这些代码示例主要来源于Github/Stack
我已经安装了 Eclipse(Indigo) 和 Java jdk1.7.0_01。我还使用 GWT SDK 2.4.0 和 App Engine SDK 1.5.5 安装了 google appen
Visual Studio 2010似乎坚持要在Web应用程序项目中进行此导入 这种导入给我们带来了什么,真的需要吗? 附带说明一下,如果您使用文本编辑器删除了此导入,Visual Studio将重
我在 TFS 服务器中配置持续集成时遇到此错误,但已经找到答案。也许这会帮助其他人: The imported project "C:\Program Files (x86)\ MSBuild\
我是一名优秀的程序员,十分优秀!