Video files won't play from Azure hosted website

Jeff 156 Reputation points
2023-03-10T12:18:53.7933333+00:00

Hello

We have a website which we host from Azure.

This website was designed and hosted by someone else, originally in the kitchen(!) then migrated to a hosting company before being exported from them to us.

This last move was completed just before I joined in November 2017. The guy who did that work was my boss until he left in December 2017.

We noticed recently that the video files (.MP4) that are contained in the website (an Azure App Service using ASP.NET V4.8) don't play. You can see the controls, but nothing happens after clicking on them.

User's image

I can see from my ex-boss's emails around the time of launch (before I started this job) that he spotted that videos weren't playing and fixed the problem.

However, he didn't actually describe what the cause of the problem was, nor what he did to resolve it. Subsequent UAT emails to him suggest that the problem was fixed.

All we know is that they're not working now. The rest of the site seems to be fine, just not the videos.

My (current) boss has worked out we can use Kudu in Azure to browse around the content/folders of the website and from that the video files themselves do seem to be all present and correct, but other than that I'm afraid we're pretty clueless about what's going on as we don't have significant web/HTML knowledge.

Can anyone here give us some pointers as to where to look in order to resolve this?

For further info, inspecting the browser's activity shows this:

(https://filestore.community.support.microsoft.com/api/images/9f976062-9249-4163-bf81-db20d3dbdc91?upload=true)

The console output '404 not found' refers to paths like this one:

[

](https://filestore.community.support.microsoft.com/api/images/a3ccc6b9-d855-4c9b-95fe-20f65954c1d9?upload=true)

When I use the Azure App Service Console to look around I find this path:

[

](https://filestore.community.support.microsoft.com/api/images/5a9d1bf9-7f24-4a2b-bc1d-f8ed11c3854b?upload=true)

Looking at the page source code, I see this:

[

](https://filestore.community.support.microsoft.com/api/images/0ae473f3-7c56-4ab2-89f1-1bd5f7cf41ab?upload=true)

Finally, trying the path URL directly just gives me this:

[

](https://filestore.community.support.microsoft.com/api/images/9f011aff-64ef-4b95-8bc1-ce245915f6ea?upload=true)

Am struggling with this.!

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,970 questions
{count} votes

Accepted answer
  1. Grmacjon-MSFT 19,301 Reputation points Moderator
    2023-05-04T22:48:56.7133333+00:00

    Hi @Jeff

    Glad to see support was able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that the question author cannot accept their own answer. They can only accept answers by others, I'll repost your solution in case you'd like to Accept the answer.

    Issue: You recently noticed that the video files (.MP4) that are hosted in Azure App Service using ASP.NET V4.8 won't play.

    Solution: You added a web.config file to the wwwroot folder with this content:

    <configuration>
        <system.webServer>
        <defaultDocument enabled="true">
            <files>
            <clear />
                <add value="index.html"/>
            </files>
        </defaultDocument>
        <staticContent>
            <mimeMap fileExtension=".woff2" mimeType="application/x-font-woff" />
            <mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
            <mimeMap fileExtension=".json" mimeType="application/json" />
            <mimeMap fileExtension=".mp4" mimeType="video/mp4" />
        </staticContent>
        </system.webServer>
    </configuration>
    
    2 people found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Jeff 156 Reputation points
    2023-04-14T15:57:03.1966667+00:00

    With thanks to Grace, and to the Microsoft Support staff who worked with me, the fix was to add a web.config file to the wwwroot folder, with this content:

    
    <configuration>
        <system.webServer>
        <defaultDocument enabled="true">
            <files>
            <clear />
                <add value="index.html"/>
            </files>
        </defaultDocument>
        <staticContent>
            <mimeMap fileExtension=".woff2" mimeType="application/x-font-woff" />
            <mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
            <mimeMap fileExtension=".json" mimeType="application/json" />
            <mimeMap fileExtension=".mp4" mimeType="video/mp4" />
        </staticContent>
        </system.webServer>
    </configuration>
    
    1 person found this answer helpful.

  2. Jeremiah Phiri- Shockey Labs 0 Reputation points
    2025-02-15T12:58:35.98+00:00

    This worked for me aswell:

    <configuration>

    <system.webServer> <defaultDocument enabled="true"> <files> <clear /> <add value="index.html"/> </files> </defaultDocument> <staticContent> <mimeMap fileExtension=".woff2" mimeType="application/x-font-woff" /> <mimeMap fileExtension=".woff" mimeType="application/x-font-woff" /> <mimeMap fileExtension=".json" mimeType="application/json" /> <mimeMap fileExtension=".mp4" mimeType="video/mp4" /> </staticContent> </system.webServer>

    </configuration>

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.