Angularjs 如何使otf字体在纯角度站点上的Azure上工作

Angularjs 如何使otf字体在纯角度站点上的Azure上工作,angularjs,azure,web,fonts,web-config,Angularjs,Azure,Web,Fonts,Web Config,我有一个纯角度的网站(不是.Net),我想在Azure上托管。我通过FTP将必要的文件上载到Azure文件夹。除了字体外,网站工作正常。它无法加载.otf字体。因为我的网站不是.Net,所以它甚至没有web.config文件。因此,我创建了以下web.config文件以支持.otf文件类型: <configuration> <configSections> </configSections> <system.web>

我有一个纯角度的网站(不是.Net),我想在Azure上托管。我通过FTP将必要的文件上载到Azure文件夹。除了字体外,网站工作正常。它无法加载.otf字体。因为我的网站不是.Net,所以它甚至没有web.config文件。因此,我创建了以下web.config文件以支持.otf文件类型:

<configuration>
    <configSections>

    </configSections>
    <system.web>
        <staticContent>
            <remove fileExtension=".otf" />
            <mimeMap fileExtension=".otf" mimeType="font/otf" />
         </staticContent>   
    </system.web>
</configuration> 
我试图在
部分声明它,如下所示:

    <sectionGroup name="system.webServer" type="System.WebServer.Configuration.SystemWebServerSectionGroup">
        <section name="staticContent" type="System.WebServer.Configuration.StaticContentSection" overrideModeDefault="Deny" />
    </sectionGroup> 

因此,如果我不声明该节,它将不起作用。如果我申报,那么它是重复的。我是错过了什么还是Azure在跟我开玩笑?

你有没有试着在你的网络配置中加入:。。。小心..它在
部分

<system.webServer>
    <staticContent>
    <remove fileExtension=".otf" />
            <mimeMap fileExtension=".otf" mimeType="font/otf" />
      <remove fileExtension=".woff" />
      <mimeMap fileExtension=".woff" mimeType="application/font-woff" />
      <remove fileExtension=".woff2" />
      <mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />

    </staticContent>
</system.webServer>

您是否尝试在您的网络配置中设置:。。。小心..它在
部分

<system.webServer>
    <staticContent>
    <remove fileExtension=".otf" />
            <mimeMap fileExtension=".otf" mimeType="font/otf" />
      <remove fileExtension=".woff" />
      <mimeMap fileExtension=".woff" mimeType="application/font-woff" />
      <remove fileExtension=".woff2" />
      <mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />

    </staticContent>
</system.webServer>


我不敢相信我写的是“system.web”而不是system.webServer。所以这只是一个打字错误。我要去洗脸。谢谢你,费德里科!我只是添加了otf声明,我不敢相信我写的是“system.web”而不是system.webServer。所以这只是一个打字错误。我要去洗脸。谢谢你,费德里科!不过我只添加了otf声明。
<system.webServer>
    <staticContent>
    <remove fileExtension=".otf" />
            <mimeMap fileExtension=".otf" mimeType="font/otf" />
      <remove fileExtension=".woff" />
      <mimeMap fileExtension=".woff" mimeType="application/font-woff" />
      <remove fileExtension=".woff2" />
      <mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />

    </staticContent>
</system.webServer>