Hello!

today I’m one of those crazy Friday that steal me more than 2 hours on a 10-minutes task.

The scenario was simple, it had to publish an ASP.Net MVC application with massive Bootstrap inside on Azure to validate it with the team in USA. Since the Azure SDK v2, this is only a 2 clicks action. However, once published the website, I find that the site is no longer working fine. (????)

After digging a little, I find out that in the publication process of ASP.Net MVC websites the svg files were not uploaded (images with extension.SVG, Scalable Vector Graphics). So that’s it, let’s see how you I solve this.

Luckily, this post from the friends of OdeToCode explains very well how to add specific file types to Web projects for this case. What we must do is to modify the we.config file in the < system.webserver > section add what we need, for example.

<staticContent>
<remove fileExtension=".mp4"/>
<remove fileExtension=".ogv"/>
<remove fileExtension=".webm"/>
<remove fileExtension=".svg"/>
<mimeMap fileExtension=".mp4" mimeType="video/mp4" />
<mimeMap fileExtension=".ogv" mimeType="video/ogg" />
<mimeMap fileExtension=".webm" mimeType="video/webm" />
<mimeMap fileExtension=".svg" mimeType="image/svg+xml"/>
</staticContent>

And that’s it!

Source: http://odetocode.com/blogs/scott/archive/2012/08/07/configuration-tips-for-asp-net-mvc-4-on-a-windows.aspx

Greetings @ farm

The Bruno

imageimageimageGoogle

Leave a comment

Discover more from El Bruno

Subscribe now to keep reading and get access to the full archive.

Continue reading