How to fix 'woff and ttf fonts 404 not found'
By FoxLearn 2/18/2024 12:58:45 AM 230
"Failed to load resource: the server responded with a status of 404 (Not Found)" or "woff2?v=4.3.0 Failed to load resource" with fontawesome-webfont.woff, fontawesome-webfont.woff2, glyphicons-halflings-regular.woff, glyphicons-halflings-regular.woff2.
If you haven't got files, i think you should download then copy to your project. First ensure that you copy all files to webserver, In Visual Studio you can click each of file then select properties->copy always
Second you need to open the Web.config file then add a config as below
<staticContent> <remove fileExtension=".woff" /> <mimeMap fileExtension=".woff" mimeType="application/font-woff" /> <remove fileExtension=".woff2" /> <mimeMap fileExtension=".woff2" mimeType="font/x-woff" /> </staticContent>
Now, Start your project again then select inspect->tab network you can see no error throw a 404 not found error on woff or woff2 files when requesting the .woff, .ttf, .woff2 files
- Unable to resolve service for type 'Microsoft.AspNetCore.Identity.RoleManager'
- ASP.NET MVC Responsive Templates Free Download
- How to upload file in ASP.NET MVC
- How to Create Contact Form Flat Responsive in ASP.NET MVC
- HTTP Error 500.30 ASP.NET Core app failed to start
- How to Use IExceptionHandler in ASP.NET Core
- How to custom exception handling in ASP.NET Core
- How to check if HttpPostedFileBase is an image