Lothre1
Lothre1

Reputation: 3853

DotLESS IIS7 is not working: LESS is not being rendered

I've downloaded my dotless core dll from dotlesscss.org and completed all the steps required to properly use less in the project.

As they explain in the home webpage, i've included the reference to the .dll.

i added the httpHandler to the webconfig file just like they recommend

<add type="dotless.Core.LessCssHttpHandler,dotless.Core" validate="false" path="*.LESS" verb="*" />

i've also created a configSection that a find out that if it's not the first child of configuration it will be returning 500 INTERNAL ERROR. (which is awesome)

and added the settings in as the child of node, where it seems to be suppose to be.

None of the styles inside my less files which were included in the master page are being loaded. Any help?

Upvotes: 1

Views: 3719

Answers (1)

chris4600
chris4600

Reputation: 183

I was having the same problem. What worked for me was putting the following web.config settings under system.webServer, instead of the suggested settings that the .less website shows under system.web:

<system.webServer>
  <handlers>
    <add name="dotless" path="*.LESS" verb="*" type="dotless.Core.LessCssHttpHandler,dotless.Core" resourceType="File" preCondition=""/>
  </handlers>
  <validation validateIntegratedModeConfiguration="false"/>
</system.webServer>

Source: http://cyrilgupta.com/?p=520

If you haven't already done so, you also need to add a MIME type for .less files in IIS, which I do not believe is listed in the instructions at dotlesscss.org.

Upvotes: 4

Related Questions