《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. HttpClient(4.5.x)正确的使用姿势

    前言: httpclient(4.5.x)默认是启动连接池的, 其降低时耗(避免连接初3次握手, 以及关闭4次握手的消耗), 显著提升高并发处理能力(大量减少time_wait), 确实扮演了重要的角 ...

  2. Templates中的for标签

    for 标签 {% for 变量 in 元组|列表|字典 %} {% endfor %} 在 Jinja2 模板的循环中,支持内部变量 - loop loop作用:记载当前循环中的一些相关信息 loo ...

  3. CodeForces - 616F:Expensive Strings (后缀自动机)

    You are given n strings ti. Each string has cost ci. Let's define the function of string , where ps, ...

  4. Spring mvc下载文件java代码

    /** * 下载模板文件 * @author cq */ @RequestMapping("/downloadExcel.do") public ResponseEntity< ...

  5. (24)ajax上传json格式的数据

    urs.py from django.conf.urls import urlfrom django.contrib import adminfrom app01 import viewsurlpat ...

  6. Windows下安装pymssql

    准备用Python接入Sql Server数据库,因此准备用pymssql模块. 安装有点纠结. 64位win10系统,python3.6 步骤: 首先需要配置一下freetds: 在这里下载:htt ...

  7. hdu2732 Leapin' Lizards 最大流+拆点

    Your platoon of wandering lizards has entered a strange room in the labyrinth you are exploring. As ...

  8. vue 插件tab选项卡(转载)

    <template> <tab :options="tabOpt" :state.sync="stateIndex"></tab& ...

  9. apache常用配置文件讲解

    apache 的httpd.conf常用配置说明 # ServerRoot: The top of the directory tree under which the server's # conf ...

  10. C/S架构程序多种类服务器之间实现单点登录

    (一) 在项目开发的过程中,经常会出现这样的情况:我们的产品包括很多,以QQ举例,如登陆.好友下载.群下载.网络硬盘.QQ游戏.QQ音乐等,总不能要求用户每次输入用户名.密码吧,为解决这个问题,高手提 ...