《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. ORACLE异常处理及函数

    有三种类型的异常错误 :预定义 ( Predefined )错误 ORACLE预定义的异常情况大约有24个.对这种异常情况的处理,无需在程序中定义,由ORACLE自动将其引发. 非预定义 ( Pred ...

  2. Nginx配置https的wordpress站点,wp-content目录下资源404解决方案

    wordpress 下配置 ssl证书, server { listen ; server_name demo.example.com; ssl on; root /data/; ssl_certif ...

  3. 【图像处理基础】LBP特征

    前言 其中dsptian的博客不仅给出了LBP的实现,还计算了LBPH,计算LBP过程中有点小瑕疵,评论中有给出修改方法.除了使用power还可以使用bitxor函数实现. lbpcode = bit ...

  4. CodeForces - 1101G :(Zero XOR Subset)-less(线性基)

    You are given an array a1,a2,…,an of integer numbers. Your task is to divide the array into the maxi ...

  5. 2018.4.23 深入理解java虚拟机(转)

    深入理解java虚拟机 精华总结(面试) 一.运行时数据区域 Java虚拟机管理的内存包括几个运行时数据内存:方法区.虚拟机栈.本地方法栈.堆.程序计数器,其中方法区和堆是由线程共享的数据区,其他几个 ...

  6. CentOS7安装PostgreSQL10,pgadmin4

    ======PostgreSQL10 CentOS7=================FYI:https://tecadmin.net/install-postgresql-server-centos ...

  7. linux---三剑客

    linux的三剑客分别为awk/sed/grep,是运维人员必不可少的常用命令. 一:awk取列 awk ‘{print $1 “ ” $2}’ old.txt awk /aaa/ old.txt 二 ...

  8. org.apache.commons.lang3.StringUtils中的StringUtils常用方法

    https://my.oschina.net/funmo/blog/615202?p=1 public static void TestStr(){ //null 和 ""操作~~ ...

  9. python 常用库及安装使用

    #win10 + python3.5.2 #pip install xxx   自动下载的缓存位置: #win7 - c:\用户\(你的用户名)\AppData\Local\pip\cache\ #l ...

  10. 【shell编程】之基础知识-函数

    linux shell 可以用户定义函数,然后在shell脚本中可以随便调用. shell中函数的定义格式如下: [ function ] funname [()] { action; [return ...