0

我的应用程序正在返回:

Failed to load resource: the server responded with a status of 500 (Internal Server Error) http://fitness-2.apphb.com/Assets/font/artill_clean_icons-webfont.woff
Failed to load resource: the server responded with a status of 500 (Internal Server Error) http://fitness-2.apphb.com/Assets/font/artill_clean_icons-webfont.ttf
Failed to load resource: the server responded with a status of 500 (Internal Server Error) http://fitness-2.apphb.com/Assets/font/rtill_clean_icons-webfont.svg#artill_clean_weather_iconsRg

我的网络配置有:

<staticContent>
      <mimeMap fileExtension=".otf" mimeType="font/otf" />
      <mimeMap fileExtension=".ttf" mimeType="application/octet-stream" />
      <remove fileExtension=".woff"/>
      <mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
    </staticContent>

我在 /Assets/font/artill_clean_icons-webfont.woff 的文件有:

Build Action: Content

我文件夹中的 CSS 文件/Assets/CSS/工作正常,所以我知道它与 Assets 文件夹无关,而是与字体文件本身无关?

我也下载了构建,字体在那里。

部署了最新版本,我在这里缺少什么?

4

1 回答 1

4

好的,我为 MVC 4 项目采取的过程:

我将每种字体设置为'Content'- 右键单击​​字体文件,属性并设置Build Action to Content.

我还包含在我的 web.config 中:

<staticContent>
      <remove fileExtension=".eot" />
      <mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" />
      <remove fileExtension=".ttf" />
      <mimeMap fileExtension=".ttf" mimeType="font/ttf" />
      <remove fileExtension=".otf" />
      <mimeMap fileExtension=".otf" mimeType="font/otf" />
      <remove fileExtension=".woff" />
      <mimeMap fileExtension=".woff" mimeType="font/x-woff" />
    </staticContent>

在 System.WebServer 部分。

于 2013-06-26T10:16:56.647 回答