Not existant FontAwesome URL After Publishing My .Net 8 Blazor Server Web App to Azure
My .Net 8 Blazor Server Web App displays FontAwesome fonts correctly when I run it locally.
My FontAwesome Directory Structure
My FontAwesome fonts are in my Web project "wwwroot.fontawesome" directory
That directory has two sub-directories:
-
"wwwroot.fontawesome.css"
-
"wwwroot.fontawesome.webfonts"
The webfonts directory contains the following file:
fa-solid-900.tff
I Get an HTTP Error 404 error with this non-existent URL after Publishing My Web App
After publishing my Web App to Azure using Visual Studio 2022 Community Edition, I get an HTTP Error 404 error with this non-existent URL:
https://Web20240310170428:80/fontawesome/webfonts/fa-solid-900.woff2
and this physical path: C:\home\site\wwwroot\fontawesome\webfonts\fa-solid-900.woff2
Related Stack Overflow Issue
I found a Stack Overflow issue, which is related to the issue I am having. https://stackoverflow.com/questions/71259880/how-to-publish-a-font-to-azure-web-apps
I have not tried to create the MIME types mentioned in the article because it's not clear that doing so would resolve the HTTP 404 error.
My Question
How can I resolve the HTTP 404 error I am getting after I publish my Blazor Server Web app on Azure?