[英]Failed to load resource: the server responded with a status of 404 (Not Found) webfonts
Font awesome icons are not displaying in the test IIS environment, but they are displaying in the localhost environment.字体真棒图标未显示在测试 IIS 环境中,但它们显示在 localhost 环境中。
I see the following error in the Console for fa-solid-900.woff2:1, fa-solid-900.woff:1 and fa-solid-900.ttf:1: Failed to load resource: the server responded with a status of 404 (Not Found)我在 fa-solid-900.woff2:1、fa-solid-900.woff:1 和 fa-solid-900.ttf:1 的控制台中看到以下错误:加载资源失败:服务器响应状态404(未找到)
The following is a URL path for one of the files:https://projectName.companyName.com/webfonts/fa-solid-900.woff2以下是其中一个文件的 URL 路径:https ://projectName.companyName.com/webfonts/fa-solid-900.woff2
The files are located in the following directory path: C:\projectName\wwwroot\Content\webfonts这些文件位于以下目录路径中:C:\projectName\wwwroot\Content\webfonts
If I copy the webfonts folder to the following directory, the font awesome icons work: C:\projectName\wwwroot\webfonts如果我将 webfonts 文件夹复制到以下目录,字体真棒图标工作:C:\projectName\wwwroot\webfonts
What should I change/update to keep the webfonts folder under the \Content folder and still have the font awesome icons work?我应该更改/更新什么以将 webfonts 文件夹保留在 \Content 文件夹下,并且字体真棒图标仍然可以使用?
该问题最终将项目发布到测试环境,并将Configuration
选项设置为Release
而不是Debug
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.