Reputation: 1095
I Have an Angular application which is hosted in azure web app. I want to access video file by requesting url like https://something.azurewebsites.net/htmldelivery/assets/videos/test.mp4 But I was not able to served requested video file from web app. It simply return "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."
App Service Plan :S1 & Location : UK West
This is how it look like my current directory structure in the web app.
When I request the video file directly from browser https://something.azurewebsites.net/htmldelivery/assets/videos/test.mp4 it returns me 404 file not found error.
Does anyone have any idea about this issue ? I was trying to configure Virtual applications and directories in web app configuration but still did not worked for me. I was changing the physical path up to site\wwwroot\htmldelivery\assets\videos\test.mp4 but still no success.
Upvotes: 3
Views: 1007
Reputation: 1095
After further investigation I came to the point that Azure web apps need some configuration to configure the mimeType in your web.config to work with video files in Azure Web App. So I have just simply created a web.config file into the root directory and it works well.
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".mp4" mimeType="video/mp4"/>
<mimeMap fileExtension=".ogv" mimeType="video/ogg"/>
<mimeMap fileExtension=".webm" mimeType="video/webm"/>
</staticContent>
</system.webServer>
Upvotes: 7