Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET Video webm not loading


I have created a basic website in asp.net. I'm playing with the azure platform, but I'm having some difficulties.
The website contains a video (.webm)

<video autoplay loop muted class="background_login" src="Content/background.webm"></video>

The video does load when running locally, but when I have pushed it to the azurewebsites.net it stays black.
I have read about the mime types, and that they should be declared. So I put this in my web.config:

<system.webServer>
<staticContent>
  <mimeMap fileExtension=".webm" mimeType="video/webm" />
</staticContent>

It still doesn't work, though. The website can be found at: 'link deleted'
The video is stored in the Content folder (checked if it's actually there with FileZilla, and it's there): 'link deleted'
Calling it directly gives a internal server error.

Any ideas of what might go wrong here?

like image 928
Hespen Avatar asked May 27 '26 13:05

Hespen


1 Answers

Sometimes if you have ASP.NET Forms authentication enabled you get HTTP 500 errors requesting static content files (.mp3, .mp4 ...)

Removing the mimeMap element should fix the problem.

Change your staticContent section to :

<staticContent>
    <remove fileExtension=".webm" />
    <mimeMap fileExtension=".webm" mimeType="video/webm" />
</staticContent>
like image 78
Phil Schneider Avatar answered May 30 '26 03:05

Phil Schneider



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!