This repository has been archived by the owner on Dec 14, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
406 Not Acceptable [Content type: video/mp4] #5582
Comments
We're going to need more information about what you're trying to do, including some code from your controller/actions. If you returns a non- |
Hmm, so is there any output formatters implemented by asp.net core to handle "video/mp4" This is my controller
It's working very good when i use simply owinservice |
No. Here's the equivalent in MVC Core 1.0: [HttpGet]
public IActionResult Get()
{
string videoPath = @"D:\sample.mp4";
if (System.IO.File.Exists(videoPath))
{
return PhysicalFile(videoPath, "video/mp4", "sample.mp4");
}
return StatusCode(StatusCodes.Status500InternalServerError);
} |
Done 🗡️ Thanks :) |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello,
I've got a little problem. I can't get my service to stop converting everything to application/json
I tried:
i was even trying with [Produces("video/mp4")] but it says " doesnt have output formatter "
Still nothing result:
application/json
or
406 Not Acceptable
How to make it work in .net core 1.0 ?
The text was updated successfully, but these errors were encountered: