【发布时间】:2014-09-12 21:26:48
【问题描述】:
我正在 VS2014 上构建一个静态 HTML5 网站,并通过 Dropbox 进行部署以托管在 Azure 上。所有作品在 VS2014 上使用 F5。但是我的 SVG 图像没有从 Azure 获得。我收到 HTTP/1.1 404 Not Found 错误。我试过这个解决方案: Use SVG in Windows Azure Websites 和 Mads Kristensen 在http://madskristensen.net/post/prepare-webconfig-for-html5-and-css3 建议的代码 sn-p。我的 web.Debug.config 和 web.Release.config 文件都如下:
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<system.webServer>
<staticContent>
<remove fileExtension=".svg"/>
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
</staticContent>
</system.webServer>
</configuration>
问题来了。我应该怎么做才能下载我的 svg 文件?
编辑:我发现了问题。作为 VS2014 和 Azure 的相对新用户,我忽略了更高级别的 Web.config 文件,只使用了上面提到的较低的两个文件。将额外的 staticContent 行放入 Web.config 文件修复了所有问题。
【问题讨论】:
标签: azure svg web-config