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.
2 years ago
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
2 years ago
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.
2 years ago
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?
2 years ago
please try with restart of your project by deleting this folder
2 years ago
Experiencing the same issue, is there a resolution for this?

Thanks
2 years ago
SecureApp Design wrote:
Experiencing the same issue, is there a resolution for this?

Thanks


Resolution:
Check the Cache directory location in App Settings
2 years ago
Can you please elaborate on this one? What directory should I put there?
2 years ago
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 ???



2 years ago
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
2 years ago
Thanks Carlos  Its work.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.