Jed*_*Jed 3 svg mime web-config azure
我有一个.svg文件位于我的Microsoft Azure "~/css/fonts/"目录中.当我发布网站时,所有的css和eot文件都是由我的唯一.svg文件发布的.
我已经阅读了其他SO帖子,提到我们必须明确添加mimeMaps到web.config,所以我已经更新/发布我web.config的以下内容:
<system.webServer>
<staticContent>
<remove fileExtension=".svg" />
<remove fileExtension=".eot" />
<remove fileExtension=".woff" />
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
<mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" />
<mimeMap fileExtension=".woff" mimeType="application/x-woff" />
</staticContent>
</system.webServer>
Run Code Online (Sandbox Code Playgroud)
...然后重新发布特定的.svg文件,但是我收到以下错误:
Preparing to publish files...
Using ID 'dc2a......' for connections to the remote server.
Using ID 'a2c7......' for connections to the remote server.
Using ID '9720......' for connections to the remote server.
Using ID 'aff7......' for connections to the remote server.
Using ID '4d1d......' for connections to the remote server.
The synchronization is being stopped because the maximum number of sync passes '5' has been exceeded even though all the changes could not be applied. This could occur if there are external changes being made to the destination.
Run Code Online (Sandbox Code Playgroud)
上面的错误只发生在我尝试上传.svg文件时(我没有抛出此错误的所有其他文件类型.)
发布我的.svg文件还需要做些什么吗?
注意:我正在使用VS2013 Pro将我的网站发布到Windows Azure.
我错误地将文件夹中的位置(在我的MVC5项目中)添加<staticContent>到了web.config位于项目根目录中的文件中.:\Views<staticContent>Web.config
一旦我将内容移动到正确的.config,我的.svg现在正在发布.