This project has moved. For the latest updates, please go here.

LessAssetHandler not being hit

Mar 14, 2014 at 2:40 PM
I've set up the stylesheets in a bundle, the composite sheet does come through to the page and renders correctly, but it isn't going through the handler to take care of caching.

The stylesheet is coming through as: "CompositeStyleSheet.ashx?v=1b20QSPYEELiqe8c7GRKqO7NsEexMGaRtc_huHgpIQU1"

I have the handler set up as:
      <add name="LessAssetHandler" path="CompositeStyleSheet.ashx" verb="GET" type="BundleTransformer.Less.HttpHandlers.LessAssetHandler, BundleTransformer.Less" resourceType="File" preCondition=""/>
any ideas?
Coordinator
Mar 14, 2014 at 2:55 PM
Hello, Perezt!

LessAssetHandler, SassAndScssAssetHandler, CoffeeScriptAssetHandler and TypeScriptAssetHandler are used only in debug mode. I recommend you carefully read documentation.
Coordinator
Mar 14, 2014 at 3:03 PM
Also recommend you to read the «Less handler always caches» discussion.
Mar 17, 2014 at 4:06 AM
ok, I was a little confused about that, but I understand what the handler is for now. Still, even when I have the bundle optimization turned off and the .less files are sent seperately, the handler isn't being used and the .less files don't compile to .css. I changed the handler to
<add name="LessAssetHandler" path="*.less" verb="GET" type="BundleTransformer.Less.HttpHandlers.LessAssetHandler, BundleTransformer.Less" resourceType="File" preCondition=""/>""/>
The handler still isn't being hit when running in debug mode and optimization is turned off.
Coordinator
Mar 17, 2014 at 6:59 AM
It is possible that you have a IIS running in Classic mode.

Also recommend you to read the «SCSS File Not Preprocessed When EnableOptimizations is False» discussion.
Marked as answer by perezt on 3/17/2014 at 8:31 AM
Mar 17, 2014 at 3:31 PM
Thank you, that fixed it.