Domanda

My Site style sheet is being ignored by every browser I have tested it one. I'm getting this error when testing on IE9 - SEC7113: CSS was ignored due to mime type mismatch

Here is the html from the header referencing it. Let me know if you need more to go by.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head runat="server">
    <title></title>

    <!--The style sheet below is the one being ignored-->
    <link rel="stylesheet" type="text/css" charset="UTF-8" href="Styles/Site.css"  />

    <!-- Skin CSS file -->
    <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/skin.css" />
    <!-- Utility Dependencies -->
    <script src="http://yui.yahooapis.com/2.9.0/build/yahoo-dom-event/yahoo-dom-event.js"></script> 
    <script src="http://yui.yahooapis.com/2.9.0/build/element/element-min.js"></script> 
    <!-- Needed for Menus, Buttons and Overlays used in the Toolbar -->
    <script src="http://yui.yahooapis.com/2.9.0/build/container/container_core-min.js">     </script>
    <script src="http://yui.yahooapis.com/2.9.0/build/menu/menu-min.js"></script>
    <script src="http://yui.yahooapis.com/2.9.0/build/button/button-min.js"></script>
    <!-- Source file for Rich Text Editor-->
    <script src="http://yui.yahooapis.com/2.9.0/build/editor/editor-min.js"></script>
    <script src="http://yui.yahooapis.com/2.9.0/build/editor/simpleeditor-min.js"></script>


</head>
È stato utile?

Soluzione

I figured it out, the company I just started working for failed to install the Static Content features for the IIS when setting up my computer. So it was ignoring all my style sheets, images, and links.

Altri suggerimenti

Your server apparently sends wrong media type information. This cannot be verifies from outside your server, though.

I had a typo in my file name and and spelled it myFile.ccs vs myFile.css, both in link and in file. Firefox was fine, but IE returned this error.

I realized that with my new Windows 10 machine, I'd failed to enable Static Content in my local IIS. To do so, go to "Turn Windows Features On or Off" from your Control Panel, and navigate to the following location:

enter image description here

Make sure this "Static Content" option is checked. Then, bring up a command window as an administrator and perform an iisreset.

Boom, fixed.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top