

If you need to add custom mappings you probably can use reflection to add mappings to the BCL MimeMapping class, it uses a custom dictionary that exposes this method, so you should invoke the following to add mappings (never tested tho, but should prob. NET Framework 4.5: string mimeType = MimeMapping.GetMimeMapping(fileName) Use the method, that is part of the BCL in.

The options were changed a bit in ASP.NET Core, here they are ( credits):
