IIS Express 和 IIS7 路径

IIS express and IIS7 path

我专家, 我需要在 IIS7 的 Web 程序 运行 上更新一些 dll。我在 Visual Studio 和 IIS express 中准备了我 PC 上的所有工作,所有更改都运行良好。所以我做了一个本地文件系统部署并将内容复制到生产服务器 运行 IIS7。 某些字体、字形显示不正确。在网络选项卡中,我可以看到所有未加载的文件都有一个 301 永久重定向,然后是 404 未找到。我仔细检查文件所在的服务器目录。

唯一能看出路径不一样。例如,在 IIS Express 上: http://localhost:49193/Content/kendo/fonts/glyphs/WebComponentsIcons.ttf?gedxeo 然后在生产现场 http://ProductionSite.com/Content/fonts/glyphs/WebComponentsIcons.ttf?gedxeo

文件的来源在 css 中,如下所示:src:url(fonts/glyphs/WebComponentsIcons.eot?gedxeo)

有什么想法吗?

更新1 Mime 定义:

<dynamicTypes>
        <add mimeType="text/*" enabled="true" />
        <add mimeType="message/*" enabled="true" />
        <add mimeType="application/x-javascript" enabled="true" />
        <!-- Compress XML files -->
        <add mimeType="application/xml" enabled="true" />
        <!-- Compress JavaScript files -->
        <add mimeType="application/javascript" enabled="true" />
        <!-- Compress JSON files -->
        <add mimeType="application/json" enabled="true" />
        <!-- Compress SVG files -->
        <add mimeType="image/svg+xml" enabled="true" />
        <!-- Compress RSS feeds -->
        <add mimeType="application/rss+xml" enabled="true" />
        <!-- Compress Atom feeds -->
        <add mimeType="application/atom+xml" enabled="true" />
        <add mimeType="*/*" enabled="false" />
      </dynamicTypes>
      <staticTypes>
        <add mimeType="text/*" enabled="true" />
        <add mimeType="message/*" enabled="true" />
        <add mimeType="application/x-javascript" enabled="true" />
        <add mimeType="application/atom+xml" enabled="true" />
        <add mimeType="application/xaml+xml" enabled="true" />
        <!-- Compress ICO icon files (Note that most .ico files are uncompressed but there are some that can contain PNG compressed images. If you are doing this, remove this line). -->
        <add mimeType="image/x-icon" enabled="true" />
        <!-- Compress XML files -->
        <add mimeType="application/xml" enabled="true" />
        <add mimeType="application/xml; charset=UTF-8" enabled="true" />
        <!-- Compress JavaScript files -->
        <add mimeType="application/javascript" enabled="true" />
        <!-- Compress JSON files -->
        <add mimeType="application/json" enabled="true" />
        <!-- Compress SVG files -->
        <add mimeType="image/svg+xml" enabled="true" />
        <!-- Compress EOT font files -->
        <add mimeType="application/vnd.ms-fontobject" enabled="true" />
        <!-- Compress TTF font files - application/font-ttf will probably be the new correct MIME type. IIS still uses application/x-font-ttf. -->
        <!--<add mimeType="application/font-ttf" enabled="true" />-->
        <add mimeType="application/x-font-ttf" enabled="true" />
        <!-- Compress OTF font files - application/font-opentype will probably be the new correct MIME type. IIS still uses font/otf. -->
        <!--<add mimeType="application/font-opentype" enabled="true" />-->
        <add mimeType="font/otf" enabled="true" />
        <!-- Compress RSS feeds -->
        <add mimeType="application/rss+xml" enabled="true" />
        <add mimeType="application/rss+xml; charset=UTF-8" enabled="true" />
        <add mimeType="*/*" enabled="false" />
      </staticTypes>

c

检查 MIME 类型。可能未为生产服务器上的字体添加 mime 类型。

我不明白为什么。我的客户端使用非常旧的 IIS 7.5 服务器... 现在解决我的问题的唯一方法是添加: BundleTable.EnableOptimizations = 假 进入 bundle.config 文件。