Azure应用服务MIME类型aac [英] Azure App Service MIME Type aac

查看:109
本文介绍了Azure应用服务MIME类型aac的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我已将ASP Net核心web api上传到azure app服务,我需要能够访问文件类型.aac。我尝试以下列方式在web.config中添加mime类型,但它仍然无效,404错误。图片工作正常

Hello, I have an ASP Net core web api uploaded to azure app service, I need to be able to access a file type .aac. I tried to add the mime type in the web.config in the following way but it still does not work, 404 error. With images works fine

< staticContent>

  &NBSP; &NBSP; &NBSP;  < mimeMap fileExtension ="。 AAC" mimeType =" audio / aac" />
$
< / staticContent>

<staticContent>
         <mimeMap fileExtension = ". aac" mimeType = "audio / aac" />
</ staticContent>

谢谢。

推荐答案

我知道你已经添加了MIME类型,但请确保删除配置之间的额外空格
,尝试添加配置如下所示没有额外的空格,并确保文件在适当的目录中:

<configuration>
  <system.webServer>
    <staticContent>
      <mimeMap fileExtension=".aac" mimeType="audio/aac" />
    </staticContent>
  </system.webServer>
</configuration>




如果问题仍然存在,此问题仅限于此文件扩展名吗? 

默认情况下,在Azure WebApps上,所有文件都与应用程序一起存储在文件系统中,包括媒体文件。您可能希望了解
文件类型 在Azure WebApp上处理。请参阅文章  文件
azure结构
 了解文件集& Azure WebApp上的dirs。
 

By default, on Azure WebApps, all files are stored in the file system with the application, including the media files. You may wish to know about the main types of files that are dealt on Azure WebApp. Refer to the article File structure on azure to know the sets of files & dirs on Azure WebApp.  


这篇关于Azure应用服务MIME类型aac的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆