IIS 7.5 and Razor Site: 500 errors for CSS and JS

I got 500 errors because I added this below to my web.config. After I removed it, I got passed the error.

<staticContent>
  <mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
</staticContent>

Mime-Types were my trouble

I had the same problem. My css and js was not delivered. Server says internal error.

I found out that i added the mimetype for mp4 in the global settings of the iis and also added the mime type in one of my websites as well. That was a problem. This mime-type can only exist in the website or global, not both. I deleted tehe global mimetype and everything worked like it should be.

Hope to help some guys of you.


Just found, that I've added to web.config *.woff MIME for IIS 7.5, so when deploying on IIS8, it's causes static files error. After removing that from web.config everything is fine.