Windows Azure Web Site (18) Azure Web App设置MIME
《Windows Azure Platform 系列文章目录》
在笔者之前的文章中,介绍了我们在使用Azure Web App,可以把静态资源保存到Azure Storage中:
Windows Azure HandBook (7) 基于Azure Web App的企业官网改造
这样动态的请求会发送到Azure Web App,静态的图片请求会发送到Azure Storage中
减少Azure Web App对于主机带宽的压力。
但是在某些时候,我们还是会把静态资源放在和Web代码里。比如我们部署的Web App代码是正常的。

然后在这个ASP.NET代码目录里,有一个MP4文件。如下图:

但是我们访问这个MP4页面,会发现404 Page Not Found:

这个问题的主要原因是,Web App针对MP4文件没有设置MIME。
我们可以修改Web App的Web.config文件,增加MIME配置,如下图:
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".mp4" mimeType="video/mp4"/>
</staticContent>
</system.webServer>
</configuration>
这样Web App就能正常播放MP4文件了:

Windows Azure Web Site (18) Azure Web App设置MIME的更多相关文章
- Windows Azure Web Site (14) Azure Web Site IP白名单
<Windows Azure Platform 系列文章目录> 我们知道,在Azure Cloud Service和Virtual Machine,可以通过Endpoint ACL (Ac ...
- Windows Azure Web Site (16) Azure Web Site HTTPS
<Windows Azure Platform 系列文章目录> 我们在使用微软云Azure Web App的时候,会使用微软的二级域名:http://xxx.chinacloudsites ...
- Windows Azure Web Site (17) Azure Web Site 固定公网IP地址
<Windows Azure Platform 系列文章目录> 在之前的文档中,笔者介绍了Azure Web Site是一个多租户的环境,每个部署单元有一个可以通过Internet访问的入 ...
- Windows Azure Web Site (12) Azure Web Site配置文件
<Windows Azure Platform 系列文章目录> 本文将介绍如何在Azure Web Site里配置连接字符串. 本文分为以下几个步骤: 1.在本地ASP.NET项目使用W ...
- Windows Azure Web Site (13) Azure Web Site备份
<Windows Azure Platform 系列文章目录> 我们在使用Windows Azure Web Site的时候,经常会遇到需要对Web Site进行备份的情况.在这里笔者简单 ...
- [New Portal]Windows Azure Web Site (3) 创建Web Site和云端数据库
<Windows Azure Platform 系列文章目录> 在前一章的内容里,我介绍了使用Windows Azure Management Portal创建Web Site.本章,我将 ...
- Windows Azure Web Site (19) Azure Web App链接到VSTS
<Windows Azure Platform 系列文章目录> 之前遇到一个问题,客户在海外使用 我参考了一下国内Azure China的文档:https://school.azure.c ...
- [New Portal]Windows Azure Virtual Machine (18) Azure Virtual Machine内部IP和外部IP
<Windows Azure Platform 系列文章目录> 在开始本章内容之前,请读者熟悉以下2篇博文: [New Portal]Windows Azure Virtual ...
- Windows Azure Web Site (8) 设置Web Site时区
<Windows Azure Platform 系列文章目录> 许多已经使用Azure Web Site的用户已经发现了,Azure Web Site默认的系统时间是UTC时区. 比如我们 ...
随机推荐
- 2.9 iframe
2.9 iframe 一.frame和iframe区别Frame与Iframe两者可以实现的功能基本相同,不过Iframe比Frame具有更多的灵活性. frame是整个页面的框架,iframe是内嵌 ...
- FileNotFoundError: [Errno 2] No such file or directory的解决方法
1.获取当前文件所在路径 basedir = os.path.dirname(__file__) print("basedir:" + basedir) 2.将路径进行拼接 upl ...
- javascript的this多种场景用法
作者:刘志祥 时间:2017.11.10 参考:阮一峰的官方网站 this 是javaScript中的一个关键字,只能在函数内使用.随着场合的不同,this的值会发生变化. 1. 单纯的全局函数调用, ...
- Gym102040 .Asia Dhaka Regional Contest(寒假自训第9场)
B .Counting Inversion 题意:给定L,R,求这个区间的逆序对数之和.(L,R<1e15) 思路:一看这个范围就知道是数位DP. 只是维护的东西稍微多一点,需要记录后面的各种数 ...
- ZOJ 1005:Jugs(思维)
Jugs Time Limit: 2 Seconds Memory Limit: 65536 KB Special Judge In the movie "Die Har ...
- Atcoder 1973:こだわり者いろはちゃん / Iroha's Obsession
C - こだわり者いろはちゃん / Iroha's Obsession Time limit : 2sec / Memory limit : 256MB Score : 300 points Prob ...
- Layer 弹出页面 在点击保存关闭弹出层
<script src="http://apps.bdimg.com/libs/jquery/2.0.0/jquery.min.js"></script> ...
- java 自带的工具
前辈说,java的基本功的好坏,一个方面要看是否能熟练使用jdk bin下的工具使用情况. 自己整理一下使用的工具. ■ javac 一个编译java的工具,进入java所在文件的路径后,javac ...
- 【BZOJ1497】【NOI2006】最大获利
最小割好劲啊 原题: 新的技术正冲击着手机通讯市场,对于各大运营商来说,这既是机遇,更是挑战.THU集团旗下的CS&T通讯公司在新一代通讯技术血战的前夜,需要做太多的准备工作,仅就站址选择一项 ...
- SPOJ NSUBSTR Substrings
题意 dt { font-weight: bold; margin-top: 20px; padding-left: 35px; } dd { box-shadow: 3px 3px 6px #888 ...