My workaround for this was to locally create my own httphandler that overwrite the content type for svg.
public class SvgHandler : IHttpHandler { public bool IsReusable { get { return false; } } public void ProcessRequest(HttpContext context) { context.Response.ContentType = "image/svg+xml"; context.Response.BinaryWrite(File.ReadAllBytes(context.Request.PhysicalPath)); context.Response.End(); } }
and in web.config I added:
<httpHandlers> <add verb="*" path="*.svg" type="SvgHandler" /> </httpHandlers>
with this solution you do not need to use IIS express, you can just use a regular development server in visual studio 2010
source share