How to get SASS working with RequestReduce?


Tags: css,sass,minify,requestreduce

Problem :

I have a new site that we have started working on that needs to have working SASS combining/minification.

Currently we are using RequestReduce on most of our projects so I have knowledge of the product.

I have installed RequestReduce and its less/sass/coffeescript add-on via the nuget feed. Requestreduce dashboard works fine and handle any css or less file that I add. So less/css/javascript works fine.

When I try to add a scss file the dashboard says it gets a 404. If I request the file manually via browser i get:

HTTP Error 404.3 - Not Found
The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.

So the file path is correct but there is no handler to take care of the scss file. The nuget added a handler for the less files in web.config but nothing for scss. Adding the mime type in IIS got rid of the error but that only adds the scss as plaintext to the document so that was not a solution. No compiling of the file is done by RequestReduce when i that case.

Anyone know how to get RequestReduce to get hold of the sass file and compile/minify it? Any help appriciated!



Solution :

After some reflecting of RequestReduce dll:s I found a Sasshandler . So adding that handler to web.config solved the issue. I don't know why the nuget package does not add this with install but hopefully it will later.

Here is the code to add to web.cofig to get sass working with requestreduce:

<system.webServer>
    <handlers>
        <add name="requestreducesass" path="*.scss" verb="GET" type="RequestReduce.SassLessCoffee.SassHandler,RequestReduce.SassLessCoffee" resourceType="File" preCondition="" />
    <handlers>
</system.webServer>

Hope this helps others with the same issue!


    CSS Howto..

    How to programmatically apply CSS definitions to the whole page?

    multiselect.js via gem multi-select-rails - how best to set width

    How to keep styles after animation?

    How to make CSS scroll panel for custom purposes?

    CSS Shadows (how to get rid of top shadow?)

    How to display child elements of
  • at 100% height?
  • How to cut divs both ways to keep the objects in center?

    How to convert an element css to JSON? [duplicate]

    How can I align a text that has a specific width at the center of a div?

    How do I get the name of div a user must click to appear in a text div?

    How to make background image fade in with css when page loads?

    How to change focus color when input is filled in with required attribute javascript/html/css

    How to make a span tag wider with an alphabet inside?

    CSS 'schema' how-to

    How can I align a button at the bottom of a div?

    I'm acquiring a VARCHAR variable through php, and want to show it using HTML/CSS. How do I auto format it so that it isn't one long sentence

    how change active class on a listItem using jquery

    How to make round corners to both inside of a box and its border?

    how to nest css boxes with relative positioning and absolute positioning

    How to add links to tabbing order when they're made visible with CSS?

    How to make Bootstrap container auto for height?

    How to set class on div that is inside of repeater in code behind?

    CSS - 5 fluid columns with 6 fixed separators, how to get them to equal 100% of containing div?

    How can I stop my cursor changing to a vertical arrow over text?

    How to expand input field to the right in a header bar

    How to position text in a navigation “div.”

    How can I use CSS styling in my GTK# application?

    Wordpress- How do i change the default font of navigation menu?

    How are these sites implementing their onhover overlays?

    How to use CSS to vertically center a form in a div