Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
We run a local xsp webserver that hosts an asp.net mvc application. The application should deliver mp4 files.
With Firefox this seems to work fine. When I enter the mp4 url (e. g. localhost:8080/test.mp4) the mp4 video is displayed in the video player of the browser.
When I do this with IE9/IE10 a download dialog appears. The issue seems to be that XSP does not add the correct mime type to the mp4 file (video/mp4) but application/octet-stream.
Is there a way to configure/ change this?
XSP is not a production web server, it is just a testing server, so many features do not exist.
I have CCed Marek that can comment on this
[10:09:38] <grendel> miguel: mime types are in system.web and one can extend the system with web.config
I've mailed with Marek. He made two suggestions:
1. Define an HttpHandler for the file extension in my application.
2. Add the missing MimeTypes to https://github.com/mono/mono/blob/master/mcs/class/System.Web/System.Web/MimeTypes.cs
Concerning suggestion 1 I have the following solution (for those who have the same requirement)
<add verb="*" path="*.mp4" type="MyApp.Helpers.MimeTypeHandler" />
public class MimeTypeHandler : IHttpHandler
public bool IsReusable
public void ProcessRequest(HttpContext context)
string absolutePath = context.Server.MapPath("~" + context.Request.Url.PathAndQuery);
var length = new System.IO.FileInfo(absolutePath).Length;
context.Response.CacheControl = "Public";
context.Response.ContentType = "video/mp4";
Concerning suggestion 2:
Richard Meyer (https://github.com/meyerrj) has already changed this in January(https://github.com/mono/mono/commit/4ee22819a50c4e7503dea54705eb11f93c84c26e)
Unfortunately it is not yet part of the latest Mono release.
I'll try to compile the current source code...
Thanks for the feedback to you both!