Hi!
I'm using the ASP.NET MVC & Jquery template (version V5.0.4). The project works great locally, how ever if I publish it I'm getting font 404 errors.
If the image link doesn't work, use: <a class="postlink" href="https://imgur.com/fxeyjkO">https://imgur.com/fxeyjkO</a>
I've added the following to the web config, but that doesn't seem to work:
<staticContent>
<remove fileExtension=".woff" />
<remove fileExtension=".woff2" />
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
<mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
</staticContent>
If I check the network tab, i'm seeing that the fonts are giving me 404 errors.
Thanks in advance!
9 Answer(s)
-
0
Hi @michelmk2,
Do you get the same behaviour for other browsers ? Which browser you are working with ?
-
0
Yes. All browsers are the same. Is there a way to add a screenshot here?
I could see the difference between local and azure version. The difference is that even though fonts folder is in under wwwroot folder, When you open inspector in chrome browser and select Sources tab you cannot see fonts folder in the list. But when you open the application in the localhost then fonts folder appears in Sources tab.
I have also updated "WebSiteRootAddress" in appsetings folder but still cannot get the fonts working in azure web app.
Thanks,
-
0
Is there a way to add a screenshot here?
You can click on Upload attachment below the Submit button. It's a problem of imgur.com — e.g. github.com images work.
-
0
-
0
I have the same issue. You might notice that the min files in *.Web.Mvc\wwwroot\view-resources\Areas\App\Views_Bundles are not updated.
I went to the command line and navigated to the root folder of the *.Web.Mvc project where the gulpfile.js is located, and I ran gulp --prod to minify the production files.
Publish the project and the updated min files should be included. It is clumsy, but it works.
-
0
Thanx Jims, your solutions works!
-
0
<cite>JimS: </cite> I have the same issue. You might notice that the min files in *.Web.Mvc\wwwroot\view-resources\Areas\App\Views_Bundles are not updated.
I went to the command line and navigated to the root folder of the *.Web.Mvc project where the gulpfile.js is located, and I ran gulp --prod to minify the production files.
Publish the project and the updated min files should be included. It is clumsy, but it works.
You're a hero man! Works like a charm.
-
0
Thanks for posting, we are experiencing the same problem too with our ci/cd implementation in vsts. Did you end up automating this fix so you don't have to manually minify and publish to prod?
-
0
hi, You have to run the below code before you release.
gulp --prod
You can specify a visual studio build event for that. See <a class="postlink" href="https://msdn.microsoft.com/en-us/library/ke5z92ks.aspx">https://msdn.microsoft.com/en-us/library/ke5z92ks.aspx</a>