You are mixing up two different LESS compiler implementations. Your javascript call might work if you were using less.js in the browser to compile your stylesheets, but since you're compiling them on the server side with dotless, what you are getting to the browser is the compiled CSS which no...

If you're using the dotLess handler to process and serve your .less files on the fly (which is fine for debugging, but you might want to consider pre-compiling for release), you need to ensure that you also send them down with the correct mimetype. You can do this either at...

It ended up with me doing this in a controller that uses the less-dll to do the compiling myself. I then call the controller to get the fully functional, compiled css. Parts of my code below: protected void SetStringToLessFileFromAllWidgets() { var widgets = widgetInfoReader.GetWidgetsAvailable(); foreach (var widget in widgets) {...