《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的更多相关文章

  1. Windows Azure Web Site (14) Azure Web Site IP白名单

    <Windows Azure Platform 系列文章目录> 我们知道,在Azure Cloud Service和Virtual Machine,可以通过Endpoint ACL (Ac ...

  2. Windows Azure Web Site (16) Azure Web Site HTTPS

    <Windows Azure Platform 系列文章目录> 我们在使用微软云Azure Web App的时候,会使用微软的二级域名:http://xxx.chinacloudsites ...

  3. Windows Azure Web Site (17) Azure Web Site 固定公网IP地址

    <Windows Azure Platform 系列文章目录> 在之前的文档中,笔者介绍了Azure Web Site是一个多租户的环境,每个部署单元有一个可以通过Internet访问的入 ...

  4. Windows Azure Web Site (12) Azure Web Site配置文件

    <Windows Azure Platform 系列文章目录>  本文将介绍如何在Azure Web Site里配置连接字符串. 本文分为以下几个步骤: 1.在本地ASP.NET项目使用W ...

  5. Windows Azure Web Site (13) Azure Web Site备份

    <Windows Azure Platform 系列文章目录> 我们在使用Windows Azure Web Site的时候,经常会遇到需要对Web Site进行备份的情况.在这里笔者简单 ...

  6. [New Portal]Windows Azure Web Site (3) 创建Web Site和云端数据库

    <Windows Azure Platform 系列文章目录> 在前一章的内容里,我介绍了使用Windows Azure Management Portal创建Web Site.本章,我将 ...

  7. Windows Azure Web Site (19) Azure Web App链接到VSTS

    <Windows Azure Platform 系列文章目录> 之前遇到一个问题,客户在海外使用 我参考了一下国内Azure China的文档:https://school.azure.c ...

  8. [New Portal]Windows Azure Virtual Machine (18) Azure Virtual Machine内部IP和外部IP

    <Windows Azure Platform 系列文章目录> 在开始本章内容之前,请读者熟悉以下2篇博文:       [New Portal]Windows Azure Virtual ...

  9. Windows Azure Web Site (8) 设置Web Site时区

    <Windows Azure Platform 系列文章目录> 许多已经使用Azure Web Site的用户已经发现了,Azure Web Site默认的系统时间是UTC时区. 比如我们 ...

随机推荐

  1. React-Native子组件修改父组件的几种方式,兄弟组件状态修改(转载)

    子组件修改父组件的状态,在开发中非常常见,下面列举了几种方式.DeviceEventEmitter可以跨组件,跨页面进行数据传递,还有一些状态的修改.http://www.jianshu.com/p/ ...

  2. 在Maven项目中,指定使用阿里云仓库下载jar包

    Maven项目中,在pom.xml的</project>标签之前加入一下标签,指定使用阿里云仓库下载jar包. <!-- 使用aliyun maven --> <repo ...

  3. CodeForces - 441E:Valera and Number (DP&数学期望&二进制)

    Valera is a coder. Recently he wrote a funny program. The pseudo code for this program is given belo ...

  4. Java设计模式(二)

    3.设计模式分类 通常来说设计模式分为三大类,共23种:   1.工厂模式 工厂模式(Factory Pattern)的意义就跟它的名字一样,在面向对象程序设计中,工厂通常是一个用来创建其他对象的对象 ...

  5. 51nod- 【1042 数字0-9的数量 】

    题目链接:https://www.51nod.com/onlineJudge/questionCode.html#!problemId=1042 题目: 1042 数字0-9的数量 基准时间限制:1  ...

  6. Socket远程桌面

    自建Socket转发,使用远程桌面(mstsc)连接家中电脑   网络结构图如下: 开题先放图,一切全靠编哈哈. 进入正题! 如图所示,我们需要一个公网服务器,利用公网服务器将内网的数据进行转发,从而 ...

  7. RESTful规范(一)

    一.学习restframework之前准备 1.json格式若想展示中文,需要ensure_ascii=False import json dic={'name':'你好'} print(json.d ...

  8. PS学习之制作音乐视屏

    素材: 新建画布 插入图片素材 调整和画布一样大小 喜欢彩色的 可以加照片滤镜 喜欢黑白的可以加黑白滤镜 也可以添加自己喜欢的文字 在窗口中选择时间轴 创建视屏时间轴 图中标记得就是每秒能播放30张 ...

  9. 自动化-python介绍与基础

    1.1-python的介绍: 简单点来说吧,python这玩意儿是一个叫做Guido van Rossum的程序猿在1989年的圣诞打发时间而决心去开发的一个脚本编程语言.它之前的名字是以abc语言的 ...

  10. Java定时任务调度工具Timer Quartz

      -----------------------------------Timer PS:Timer是 jdk中的:Quartz是第三方的 PS:也即是返回执行任务时候的时间 ----------- ...