Not existant FontAwesome URL After Publishing My .Net 8 Blazor Server Web App to Azure

Philip Quarles 0 Reputation points
2024-03-13T15:17:27.1566667+00:00

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?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,970 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.