I have a pure angular website (not .Net) that I want to host on Azure. I uploaded necessary files my Azure folder over FTP. Site works fine except fonts. It cannot load .otf fonts. Since my website is not .Net, it doesn't even have a web.config file. So I created the following web.config file to be able to support .otf file type:
<configuration>
<configSections>
</configSections>
<system.web>
<staticContent>
<remove fileExtension=".otf" />
<mimeMap fileExtension=".otf" mimeType="font/otf" />
</staticContent>
</system.web>
</configuration>
After this, I started to get the following error message:
The configuration section 'staticContent' cannot be read because it is missing a section declaration.
I tried to declare it in the <configSections> part like this:
<sectionGroup name="system.webServer" type="System.WebServer.Configuration.SystemWebServerSectionGroup">
<section name="staticContent" type="System.WebServer.Configuration.StaticContentSection" overrideModeDefault="Deny" />
</sectionGroup>
And now I get the following error:
There is a duplicate 'system.webServer/staticContent' section defined
So if I don't declare the section, it doesn't work. If I declare it, then it is duplicate. Am I missing something or is Azure kidding with me?
Aucun commentaire:
Enregistrer un commentaire