Refused to apply style from "css-file-path" because its MIME type ('') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 2 años
Hii
I have installed  a Nop-Template theme in my NopCommerce 4.3 .It was working fine since a month.
now i changed some settings from  Admin Side in  a theme related to  menu .
and then i just clear and rebuild my project.
Now I'm getting the error "Refused to apply style from 'CSS  file path' because its MIME type ('') is not a supported stylesheet MIME type, and strict MIME checking is enabled."

I have reverted all the changes even from  admin side. Still no clue getting
it shows me the mime type error in  wwwroot/bundles/  files in  different different files.
I'm stuck . what going wrong with it .
At admin  side all the minification  checkboxes are also ticked for all  stores
Hace 2 años
Please check your web.config, is it default nopCommerce web.config or modified?
Specially check the marked portion.

Also, I would suggest you to stop CSS bundling and minification then try if the issue resolved or not, later on you may turn on CSS bundling and minification again.
Hace 2 años
Hii
I checked the marked portal  in  web.config. It is there. Also tried by stopping the css minification .
Same error is there.
Do I need to  uninstall the theme and reinstall again?
Hace 2 años
please try with restart of your project by deleting this folder
Hace 2 años
Experiencing the same issue, is there a resolution for this?

Thanks
Hace 2 años
SecureApp Design wrote:
Experiencing the same issue, is there a resolution for this?

Thanks


Resolution:
Check the Cache directory location in App Settings
Hace 2 años
Can you please elaborate on this one? What directory should I put there?
Hace 2 años
I upgrade 4.30 to 4.50.1 from that day  I am also facing the same issue on all pages of  my website  http://www.smmotors.org

""Refused to apply style from "css-file-path" because its MIME type ('') is not a supported stylesheet MIME type, and strict MIME checking is enabled""  


On first attempt page will not load properly, when we refresh that page again the page will be loaded properly.

Any Solution ???



Hace 2 años
sm4pk,

Check in ~\App_Data\appsettings.json the CacheDirectory value in WebOptimizer section.
It should be something like this:
"CacheDirectory": "~/wwwroot/bundles",

Perhaps it is set a local path
Hace 2 años
Thanks Carlos  Its work.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.