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时区. 比如我们 ...
随机推荐
- 第四十一课 KMP子串查找算法
问题: 右移的位数和目标串没有多大的关系,和子串有关系. 已匹配的字符数现在已经有了,部分匹配值还没有. 前六位匹配成功就去查找PMT中的第六位. 现在的任务就是求得部分匹配表. 问题:怎么得到部分匹 ...
- qt 内置图标使用
QToolButton *button = new QToolButton(this); button->resize(100,30); button->setToolButtonStyl ...
- xdoj-1117(记忆化搜索+组合数学)
因为我是从上到下,所以就不叫动态规划而叫记忆化搜索吧 (不过运行时间只有3ms....应该是很不错的吧) 排版怎么那么难看...编辑的时候不是这样子的啊?! 思想 : 大眼一看应该是一道很裸的状压dp ...
- PS学习之餐饮行业修图
素材 红烧肉 生菜 洋葱 目标效果 开始操作: 首先打开PS,将红烧肉素材放入 将红烧肉单另扣下来(用快随选择工具 按住Alt键是减选 抠图时 将画布放大 细细的扣) 然后创建一个和当前选区大小 ...
- time,datetime模块
time & datetime 模块 在平常的代码中,我们常常需要与时间打交道.在Python中,与时间处理有关的模块就包括:time,datetime,calendar(很少用,不讲),下面 ...
- python:代码复用与函数递归
#recursion.py:打印斐波那契数列 def fact(n): if n==1 or n==2: return 1 else: return fact(n-1)+fact(n-2) while ...
- 《DSP using MATLAB》Problem 5.27
代码: %% +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Outp ...
- powerdesigner基本使用
parent sonPK主键 FK外键 n ------> 1 alter table muniubox.cpa_accounting_book add constraint FK_Refere ...
- AangularJS过滤器详解
(参考angular权威指南) 过滤器: 用来格式化需要展示给用户的数据: 使用过滤器的方式: (1)$scope.name=$filter("lowercase").(&qu ...
- myBatis框架的配置部分
第一步:导包. 第二步:配置部分(第一部分) <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE ...