3
votes

There seems to be a strange problem with my Azure webapp. I can't view MP4 files on my browser at all. After exploring few articles here, I did the following: I use Github continuous deployment, so I created a new file called "Web.config". The content of it is the following:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <staticContent>
            <remove fileExtension=".svg" />
            <remove fileExtension=".eot" />
            <remove fileExtension=".woff" />
            <remove fileExtension=".woff2" />
            <remove fileExtension=".mp4" />
            <mimeMap fileExtension=".svg" mimeType="image/svg+xml"  />
            <mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" />
            <mimeMap fileExtension=".woff" mimeType="application/x-woff" />
            <mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
            <mimeMap fileExtension=".mp4" mimeType="video/mp4" />
        </staticContent>
    </system.webServer>
</configuration>

I made sure on the FTP that the file exists in the '/site/wwwroot' directory, and it does. I also made sure the MP4 file exists on the FTP in an accessible location.

The error I get on the website is the following:

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

Can anyone help me debug this problem?

1
Note: I did set a virtual application and directories setting from: \ To: site\wwwroot\www (The website itself works) - Daniel Golub
Where is the web.config file and where is the .mp4 file? - Benjamin Talmard
@BenjaminTalmard /site/wwwroot/Web.config /site/wwwroot/www/img/wallpapers/video-background-4.mp4 - Daniel Golub
Can you try to move the Web.config to /site/wwwroot/www ? - Benjamin Talmard
@BenjaminTalmard It worked! thanks. - Daniel Golub

1 Answers

5
votes

Following our discussion, your web.config is right. You have to make sure to locate it in the right location to make it works (the virtual application root in your case).

As Azure App Service is using IIS, you can find more details regarding IIS configuration files here: http://www.iis.net/learn/get-started/planning-your-iis-architecture/deep-dive-into-iis-configuration-with-iis-7-and-iis-8

I hope this helps,