I have an MVC website and occasionally on my test server, the CSS will not load.
It seems to work fine on my local machine.
What appears to be happening is that it is requesting the CSS file with the wrong MIME type and I get the error "The stylesheet was not loaded because its MIME type, "text/html", is not "text/css". It then redirects me to the login page.
The line of code for my CSS is:
<link rel="stylesheet" type="text/css" href="/Resources/CSS/main.css">
I have also checked the MIME types in IIS and it seems to be set up fine.
If I soft reload the page, the CSS appears fine, but if I hard refresh the page I get that error, the CSS won't load and it redirects me to the login page, as if I do not have sufficient privileges.
When I go to the source code, I cannot browse to the CSS file by clicking on the url, although the file is physically there if I type in the path.