《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. [转]linux C/C++服务器后台开发面试题总结

    linux C/C++服务器后台开发面试题总结  https://www.cnblogs.com/nancymake/p/6516933.html 一.编程语言 1.根据熟悉的语言,谈谈两种语言的区别 ...

  2. 12.2 关闭DLM 自动收集统计信息 (SCM0)ORA-00600之[ksliwat: bad wait time]

    一.报错日志 db_alert ORA-: ??????, ??: [ksliwat: bad wait time], [], [], [], [], [], [], [], [], [], [], ...

  3. C++中vector容器的常用操作方法实例总结

    C++中vector容器的常用操作方法实例总结 参考 1. C++中vector容器的常用操作方法实例总结: 完

  4. HanLP 配置与使用

    https://github.com/hankcs/HanLP 下载 hanlp-1.6.0.jar和 hanlp.properties 放在主目录下 修改 hanlp.properties 参考官网 ...

  5. Javascript中的Bind,Call和Apply

    http://www.html-js.com/article/JavaScript-functional-programming-in-Javascript-Bind-Call-and-Apply?s ...

  6. centos6安装opencv2

    环境 centos6.5 opencv2.4 python2.6(centos自带的) 下载 opencv可从GitHub下载https://github.com/opencv/opencv/tree ...

  7. (12)模板语言-with

    with的用处 当一个变量特别特别长,可以用with给这个变量重命名 views.py from django.shortcuts import render,HttpResponse def ind ...

  8. Tag文件的创建与应用

    Tag文件,几乎和JSP文件一模一样,可以被JSP页面动态加载调用.Tag文件有什么优势呢(既然和JSP几乎一模一样,那就得想想这个必然有不一样的地方,不然要它存在干嘛) 在设计Web应用时,可以通过 ...

  9. 几个OOD概念

    Composition vs. Aggregation Composition和Aggregation都是”包含”的关系 (part of, made up of) ,不同的是生命周期.对于Compo ...

  10. NYOJ 483 Nightmare 【广搜】+【无标记】

    版权声明:长风原创 https://blog.csdn.net/u012846486/article/details/31032479 Nightmare 时间限制:1000 ms  |  内存限制: ...