Reputation: 109
Hi good people I hope you well.
Can any one who can help? I have developed a windows application. I have a problem here with fa icons it do appear when i run the application locally on my machine but I published the application to web-server fa icons does not appear on the browser it just display the small squares.
BundleConfig.cs
bundles.Add(new StyleBundle("~/Content/font-awesome/css").Include(
"~/Content/font-awesome/css/font-awesome.css",
"~/Content/font-awesome/css/font-awesome.min.css"
));
_Layout.cshtml
@Styles.Render("~/Content/font-awesome/css")
I think this is the correct way to read the style in mvc that is above.
How can I solve this error please help me guys.
Upvotes: 0
Views: 844
Reputation: 3968
There could be multiple reasons for this but i would like to advice that check if URL of the font awesome files are absolute or relative. If URLs are relative then there might be the issue with the resolution of the URLs.
To assist further could you share link to your app?
EDIT:
Try Using CssRewriteUrlTransform
Described here http://ericpanorel.net/2013/10/25/font-awesome-4-0-mvc-bundling-and-minification/
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/font-awesome/css/font-awesome.css", new CssRewriteUrlTransform());
Upvotes: 1