5 step process to get dotless installed doesn't work

1,791 views
Skip to first unread message

alan huffman

unread,
Jan 31, 2011, 11:36:42 PM1/31/11
to DotLess (Less Css for .NET)
Fantastic job with the port.

The quick start directions don't work for me. Few things missing

1) Apparently I have to add the .LESS Mime-type to IS

2) Once that is added, the .LESS files come across but are not
dynamically converted into CSS syntax -- as if the HTTPHandler is not
working / used.

Can you post an example web config?

Are there any additional steps I need to take?

Thanks,
Alan

Daniel Hölbling

unread,
Feb 1, 2011, 7:10:11 AM2/1/11
to dot...@googlegroups.com
Hi,

what IIS are you using?
If you are using IIS6 you need to make sure that .less files are being forwarded to the .NET Pipeline, otherwise they are treated as flat files and served as such.
You can work around this by renaming your .less files to a extension IIS knows to map to .NET and then change the HttpHandler

greetings Daniel

alan huffman

unread,
Feb 1, 2011, 3:31:34 PM2/1/11
to DotLess (Less Css for .NET)
I'm using IIS 7.5.

I'm still having problem w/ #2 :

the .LESS files come across but are not
dynamically converted into CSS syntax -- as if the HTTPHandler is not
working / used.

Does someone have a web.config I could look at?

-A


On Feb 1, 6:10 am, Daniel Hölbling <tigra...@tigraine.at> wrote:
> Hi,
>
> what IIS are you using?
> If you are using IIS6 you need to make sure that .less files are being
> forwarded to the .NET Pipeline, otherwise they are treated as flat files and
> served as such.
> You can work around this by renaming your .less files to a extension IIS
> knows to map to .NET and then change the HttpHandler
>
> greetings Daniel
>

Daniel Hölbling

unread,
Feb 1, 2011, 3:49:57 PM2/1/11
to dot...@googlegroups.com
I don't have one handy as I use dotless mainly through the console compiler.. 
But if you can post your web.config I could look over that.. 

greetings Daniel

Mvc Nedir

unread,
Feb 2, 2011, 12:26:09 PM2/2/11
to DotLess (Less Css for .NET)
You have to do this,

iis > Web Sites > Right click on your web site >
Properties > Home Directory > Configurations >
Wild Card Application Maps > Insert

then insert your asp.net dll ( c:\windows\microsoft.net\framework
\v4.0.30319\aspnet_isapi.dll )

and uncheck "Verify that file exists"

and ok.

alan huffman

unread,
Feb 3, 2011, 12:03:07 AM2/3/11
to DotLess (Less Css for .NET)
I needed to add this:

<system.webServer>
<validation validateIntegratedModeConfiguration="false" />

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


Thanks all.

-A

Abhishek Suresh

unread,
May 1, 2012, 9:45:35 AM5/1/12
to dot...@googlegroups.com
Hi There,

Even I am facing a similar problem. The HttpHandler doesn't seem to work. I am working on IIS 7.5 and I have included the MIME extensions and all. The flat .less files are loaded. Would be great if you could help me resolve this issue.

web.config file -

<configSections>
    
    <section name="dotless" type="dotless.Core.configuration.DotlessConfigurationSectionHandler,dotless.Core" />
  </configSections>
  <dotless minifyCss="true" cache="true" />

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

Thanks!

Daniel Hölbling

unread,
May 1, 2012, 10:14:10 AM5/1/12
to dot...@googlegroups.com
on IIS7 there is usually a second <system.web> section that also needs to have the HttpHandler.. I think it's  http://www.iis.net/ConfigReference/system.webServer <system.webserver> that also has a <httpHandlers> section and you need to add the handler there too

greetings Daniel

--
You received this message because you are subscribed to the Google Groups "DotLess (Less Css for .NET)" group.
To view this discussion on the web visit https://groups.google.com/d/msg/dotless/-/WaDEWbKmCnMJ.
To post to this group, send email to dot...@googlegroups.com.
To unsubscribe from this group, send email to dotless+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dotless?hl=en.

Abhishek Suresh

unread,
May 2, 2012, 9:37:59 AM5/2/12
to dot...@googlegroups.com
Hi Tigraine,

Thanks for the prompt reply, but I'm still unable to get it sorted. Here is some more info:

 
1. We are on IIS 7.5 (Classic Pipeline Mode)

2. Config Section:
<section name="dotless" type="dotless.Core.configuration.DotlessConfigurationSectionHandler,dotless.Core" />

3. dotless Section:
<dotless minifyCss="true" cache="true" />

4. System.Web:
<httpHandlers><add type="dotless.Core.LessCssHttpHandler,dotless.Core" validate="false" path="*.LESS" verb="*" /></httpHandlers>

5. System.webServer:
<validation validateIntegratedModeConfiguration="false" />

    <staticContent>
        <mimeMap fileExtension=".less" mimeType="text/css" />
    </staticContent>
     <modules runAllManagedModulesForAllRequests="true" />
  <handlers> 
      <add name="dotless" path="*.LESS" verb="*" 
type="dotless.Core.LessCssHttpHandler,dotless.Core" 
resourceType="File" preCondition=""/> 
    </handlers>  

(I have even tried Manually including the dotless HTTP Handler)
        
6. Manual Inclusion of the isapi.dll in the HTTP Handlers in the IIS

Am I missing something here? 

Thanks!

A

greetings Daniel

To unsubscribe from this group, send email to dotless+unsubscribe@googlegroups.com.

Abhishek Suresh

unread,
May 2, 2012, 10:07:27 AM5/2/12
to dot...@googlegroups.com
I am very eager to get this solved asap. Waiting to post a blog on this! :)

Abhishek Suresh

unread,
May 2, 2012, 11:06:24 AM5/2/12
to dot...@googlegroups.com
Oh my, I just figured out the problem! It was due to lack of concentration on what I was doing :P


I added the Script Map in the way it was mentioned in the above post WITH the same settings I have mentioned above. It worked! :)

Thanks Everyone! Time to post my blog!

Daniel Hölbling

unread,
May 2, 2012, 5:11:53 PM5/2/12
to dot...@googlegroups.com
Glad you figured it out .. II7 questions are always a bit tricky since I don't deploy to IIS7 myself and can't really test that..

greetings Daniel

To view this discussion on the web visit https://groups.google.com/d/msg/dotless/-/PuXMVr1_KxYJ.

To post to this group, send email to dot...@googlegroups.com.
To unsubscribe from this group, send email to dotless+u...@googlegroups.com.

Luke Page

unread,
May 3, 2012, 2:01:01 AM5/3/12
to dot...@googlegroups.com

Do you have a link to your blog post if its about dotless? Might be nice to put it or a link to it on the wiki.

To view this discussion on the web visit https://groups.google.com/d/msg/dotless/-/PuXMVr1_KxYJ.

To post to this group, send email to dot...@googlegroups.com.
To unsubscribe from this group, send email to dotless+u...@googlegroups.com.

Abhishek Suresh

unread,
Jun 8, 2012, 5:25:01 AM6/8/12
to dot...@googlegroups.com
Hey Luke,

Sorry I was not able to create the blog post yet. I was travelling, will post about it in a couple of days. Will share the link here!

Thanks!

carloste...@gmail.com

unread,
Jul 16, 2012, 12:23:08 AM7/16/12
to dot...@googlegroups.com
Hi Alan,
   I had the same issue with a template I got off of themeforest.net. I tried the mods to the web.config file like mentioned on this thread, but what worked for me was actually adding the .less extension as a txt/csss type on the MIME Type icon.  I found this through windows 2008 Server Manager.. Roles.. Web Server (IIS).. Then Internet Information Services (IIS).. Connections...  my website... then MIME types under the IIS features view.
Hope this helps...

olive...@gmail.com

unread,
Aug 30, 2012, 3:35:04 AM8/30/12
to dot...@googlegroups.com, al...@simplelandlording.com
After following the instructions on the dotless page my pages weren't applying the css I put in the less files.

When I moved the handler from web.config to system.webserver fixed the problem for me (MVC3 application).

Thanks!
Reply all
Reply to author
Forward
0 new messages