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时区. 比如我们 ...
随机推荐
- Angular 组件
1 2 change是TimepickerDemoCtrl上的,mytime在timepicker内部改变生效就会触发 3 timepicker内部绑定TimepickerDemoCtrl对值的监控 ...
- unity ugui Toggle Group详解(Chinar出品、简单易懂)
UGUI Toggle Group用法教程 本文提供全流程,中文翻译. Chinar 坚持将简单的生活方式,带给世人!(拥有更好的阅读体验 -- 高分辨率用户请根据需求调整网页缩放比例) Chinar ...
- Structural Features for Predicting the Linguistic Quality of Text: Applications to Machine Translation, Automatic Summarization and Human-Authored Text -paper
abstract句子结构是文本语言质量的关键,我们记录了以下实验结果:句法短语统计和其他结构特征对文本方面的预测能力.手工评估的句子fluency流利度用于机器翻译评估和文本摘要质量的评估是黄金准则. ...
- HDU 1873 看病要排队 优先队列
Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s) ...
- (0)diango、ORM的语法
Django PS:Django默认的是sqlite3数据库 PS:settings里面的这里可以修改数据库 1.^ 这个符号就是以什么开头 #url(r'index/',views.index) ...
- (2)MySQL的增删改查基本操作
数据库增删改查的基本操作(数据文件在data目录下) 数据库的专业术语 1.文件夹:数据库 2.文件:数据表 指令的注意事项 1.用use的时候指令结尾不需要跟一个分号 ‘:’ 2.如果用show或其 ...
- 实验吧—隐写术——WP之 Fair-Play
首先,我们读题发现题目是Playfair,其实我也不知道这是什么,那么就百度一下啊 Playfair解密算法: 首先将密钥填写在一个5*5的矩阵中(去Q留Z),矩阵中其它未用到的字母按顺序填在矩阵剩 ...
- linux系统lnmp环境包搬家教程
打包搬家apt-get install zip unzip -yyum install zip unzip -y# debian ubuntu 用apt-get,centos用yumcd /home/ ...
- 【JVM】参数配置
[一]JVM参数配置释意 编号 配置项 例子 含义 备注 1 -Xmx -Xmx20m java应用最大可用内存为20M 整个JVM内存大小=年轻代大小 + 年老代大小 + 持久代大小.持久代一般固 ...
- 芯灵思SinA33开发板怎样安装虚拟机
芯灵思SinA33开发板怎样安装虚拟机 今天入手一块芯灵思的开发板,型号为SIN-A33,用的是全志的A33芯片,与其它开发板不同的是, 芯灵思开发板手册上用来搭建开发环境的linux系统是cento ...