I am trying to get http://www.dotlesscss.org/ installed on sharepoint 2010 server for use for the whole site instead of just an application.

I have installed the dll into the GAC and the bin of the server and made the following web.config updates:

        <SafeControl Assembly="dotless.Core, Version=, Culture=neutral, PublicKeyToken=96b446c9e63eae34" Namespace="dotless.Core" TypeName="*" Safe="True" SafeAgainstScript="False" />

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

        <add name="dotless" type="dotless.Core.LessCssHttpHandler,dotless.Core" preCondition="integratedMode" path="*.LESS" verb="*" />

When I try to access a .less file (http://myserver.com/lesstest.less) I receive a 404 error with a response body of: /* File Not Found while parsing: Could not find file 'C:\inetpub\_wwwroot\wss\VirtualDirectories\WWW80\lesstest.LESS'. */

This error seems to come from: https://github.com/dotless/dotless/blob/master/src/dotless.AspNet/LessCssHttpHandler.cs

Does anyone have any insight as to what may be my problem?


1 Answer 1


My assumption by your error is that your .LESS file is in the SharePoint Content Database rather than on the hard drive. In order for the .LESS files IN SharePoint to run through the handler, you would need to rework the Less Handler to integrate a bit with SharePoint.

HOWEVER, if you put the .LESS files on the server hard drive, the handler will be able to find them. In Visual Studio, you could create a simple SharePoint solution that puts your .LESS files in the _LAYOUTS folder...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.