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时区. 比如我们 ...
随机推荐
- phpStrom--我常用的快捷键
ALT+ ←/→ 切换代码视图,标签切换 ALT+ ↑/↓ 在方法间快速移动定位 ctrl+shift+r 查找 替换 alt+ctrl+l 格式化代码 CTRL+N 查找类 CTRL+W ...
- 使用PHPMailer 中的报错解决 "Connection failed. Error #2: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:"
PHPMailer项目地址:https://github.com/PHPMailer/PHPMailer 项目中用到PHPMailer,使用过程中报错:"Connection failed. ...
- deconvolution layer parameter setting
reference: 1. Paper describes initializing the deconv layer with bilinear filter coefficients and tr ...
- [LeetCode&Python] Problem 762. Prime Number of Set Bits in Binary Representation
Given two integers L and R, find the count of numbers in the range [L, R](inclusive) having a prime ...
- 深入java final关键字
Java final关键字详解:https://blog.csdn.net/kuangay/article/details/81509164 深入java final关键字 用法注意点和JVM对其进行 ...
- HDACM2021(发工资)
发工资咯:) Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Subm ...
- 云计算SPI(SaaS、PaaS、IaaS)
云计算SPI(SaaS.PaaS.IaaS) The other day, I arrived at the SAP LABS CHINA for interview with my pleasure ...
- 08 正则表达式,Math类,Random,System类,BigInteger,BigDecimal,Date,DateFormat,Calendar
正则表达式: 是指一个用来描述或者匹配一系列符合某个语法规则的字符串的单个字符串.其实就是一种规则.有自己特殊的应用. public class Demo2_Regex { public sta ...
- python------模块定义、导入、优化 ------->os模块
1. os模块 提供对操作系统进行调用的接口. 1 os.getcwd() #获取当前工作目录,即当前python脚本工作的目录路径 'C:\\Users\\maziwei' os.chdir() # ...
- java 编译 运行 及 引用外部 jar 包的方法
1. 环境变量配置 JAVA_HOMEC:\Program Files\Java\jdk1.8.0_121; PATH%PATH%;C:\Java\jdk1.6.0_30\bin; CLASSPATH ...