How to fix Fix Font Awesome WebFont woff2 not working BundleConfig
By FoxLearn 2/18/2024 1:25:49 AM 42
In this post i shows you how to fix Font Awesome woff2 404 not found 'woff2?v=4.6.3 Failed to load resource', when bundles css files in ASP.NET MVC.
- fontawesome-webfont.woff2?v=4.6.3 Failed to load resource: the server responded with a status of 404 (Not Found)
- fontawesome-webfont.woff?v=4.6.3 Failed to load resource: the server responded with a status of 404 (Not Found)
First, Make sure that your web site has not errors while running without bundling css files.
You need to add CssRewriteUrlTransform to the RegisterBundles method as shown below or you can also copy the fonts directory to the same project.
using System.Web; using System.Web.Optimization; namespace Invoice { public class BundleConfig { public static void RegisterBundles(BundleCollection bundles) { bundles.Add(new StyleBundle("~/login/css") .Include("~/assets/css/bootstrap.min.css", new CssRewriteUrlTransform()) .Include("~/assets/css/font-awesome.min.css", new CssRewriteUrlTransform()) .Include("~/assets/css/beyond.min.css", new CssRewriteUrlTransform()) .Include("~/assets/css/animate.min.css", new CssRewriteUrlTransform())); } } }
- How to fix "InvalidOperationException: No service for type 'Microsoft.AspNetCore.Identity.UserManager'"
- How to fix 'IMvcBuilder' does not contain a definition for 'AddNewtonsoftJson'
- ASP.NET Core: How to Create RDLC Report in ASP.NET Core
- ASP.NET MVC: Free Responsive Templates
- How to fix Assets file 'project.assets.json' not found
- How to fix 'DbContextOptionsBuilder' does not contain a definition for 'UseSqlServer'
- How to set cookie ValidationInterval in ASP.NET Core
- How to fix LoginPath not working in ASP.NET Core
Categories
Popular Posts
Visual Studio: Auto increment version
04/01/2024
What is ARM architecture?
04/01/2024