I am trying to transfer QuickTime video to iPhone from an ASP.NET web application using HttpHandler. When you host a web application from IIS 5.1 (Windows XP), the video player opens, and then the error message "Server is configured incorrectly" is displayed. However, when using IIS 7.5 (Windows 7), the video plays normally.
The production environment is running IIS 6.0 and has the same problem when the error above is displayed when trying to play video on iPhone via Mobile Safari.
I checked the Http headers and they seem to be practically the same between the two servers (except for a few, for example the server header, which will obviously be different), except that they appear in a different order, although I doubt that this causes a problem.
According to this thread in Google groups, adding the title "Accept-Ranges: bytes" might help, although it didn't make any difference to us. I also added an ETag header with no luck.
The code actually responsible for sending the file looks something like this:
Context.Response.Buffer = true;
Context.Response.ContentType = "video/x-m4v";
Context.Response.AppendHeader("Content-Disposition", "filename=\"Video.m4v\"");
Context.Response.AppendHeader("Content-Length", "23456789");
Context.Response.AppendHeader("Accept-Ranges", "bytes");
Context.Response.AppendHeader("ETag", GetETag(path));
Context.Response.TransmitFile(path);
, , , , IIS 7.5 Windows 7. iPhone Mobile Safari - ASP.NET, IIS 5.1 IIS 6.0.
- - - , , ?