Failed to publish .SVG file to Azure Website

I have a .svg file located in my Microsoft Azure directory "~/css/fonts/"

. When I publish the site, all css and eot files are published and my only .svg file doesn't.

I read other SO posts that mentioned that we have to explicitly add mimeMaps

in web.config

, so I updated / posted mine web.config

with the following:

<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>

      

... and then re-publish the specific .svg file, but I get the following error:

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.

      

The error above only occurs when I try to load the .svg file (all other file types that I have not thrown out).

Is there anything else I need to do to publish my .svg file?

Note. I am using VS2013 Pro to publish my site to Windows Azure.

+3


source to share


1 answer


I made the mistake of adding <staticContent>

in web.config

, located in a folder Views

(in my MVC5 proj) instead of placing <staticContent>

in a file web.config

that is in the root of my project.: \



Once I moved the content to the correct .config, now my .svg is now published.

+5


source







All Articles