Getting a 404 error with Less CSS and ASP.net

August 27th, 2012 by admin Leave a reply »

I came across the LESS library found HERE, this library allows you to basically condense your css using variables and other nifty little things like javascript syntax to get your css down to a very manageable and easy to read file. Well, if you are using ASP.net you will get a 404 when you try to load it and that basically happens because the IIS server doesn’t recognize the less file type so you can either add the MIME type to your IIS MIME types or you can just add the entry to your web.config like so:

<system.webServer>
    <staticContent>
      <mimeMap fileExtension=".less" mimeType="text/css" />
    </staticContent >
  </system.webServer>

Advertisement

Leave a Reply