stylesheets not loading after deployed to server - need base url
Application runs great locally but when deployed to the dev server, its not loading style sheets, etc.
This is using Metronics theme.
Refused to apply style from 'https://someservername/assets/plugins/custom/datatables/datatables.bundle.css'
because its MIME type ('text/html') is not a supported stylesheet MIME type,
and strict MIME checking is enabled.
locally this works
themesettings.json
"AssetsDir": "assets/",
I can hardcode this to have the application name but was wondering if there is a way to get the application name from the url.
Thanks!
Replies (3)
Hi David,
May I know which application are you using? Is it Blazor, Asp.net or Spring?
Thanks
.NET 6.0 C#
Hi David,
Can you try to put a base tag into head
inside Starterkit/Views/Layout/Master.cshtml as shown below?
<base href="/">
Regards,
Lauris Stepanovs,
Keenthemes Support Team