Won't work on IIS 7.5 Classic Mode

1,194 views
Skip to first unread message

dgo.po...@gmail.com

unread,
Mar 13, 2012, 1:53:27 PM3/13/12
to dot...@googlegroups.com
I've been reading previous threads, people having similar problems to get it to work under IIS 7.5, in Classic Mode.

In my web.config, I added <add verb="*" path="*.less" type="dotless.Core.LessCssHttpHandler, dotless.Core" validate="false" /> to system.web >> httpHandlers, and <add name=".LESS" preCondition="integratedMode" verb="GET,HEAD" path="*.less" type="dotless.Core.LessCssHttpHandler, dotless.Core" /> to system.webServer >> handlers, but it gives an "The requested content appears to be script and will not be served by the static file handler" error.
If I add <mimeMap fileExtension=".less" mimeType="text" /> to staticContent, the error goes away, but the .less won't be transformed.

Appreciate any help! 

dgo.po...@gmail.com

unread,
Mar 14, 2012, 9:29:15 AM3/14/12
to dot...@googlegroups.com
I saw in another thread where someone would compile all the .less files at application startup, and write the .css files.

Is this the way to go on Classic Mode?

Daniel Lo Nigro

unread,
Mar 19, 2012, 8:00:11 PM3/19/12
to DotLess (Less Css for .NET)
You need to add a handler mapping in the IIS config.

Site -> Handler Mappings -> Add Script Map
Request path: *.less
Executable: c:\Windows\Microsoft.NET
\Framework64\v4.0.30319\aspnet_isapi.dll
Name: Less CSS

On Mar 14, 4:53 am, dgo.ponci...@gmail.com wrote:
> I've been reading previous threads, people having similar problems to get
> it to work under IIS 7.5, in Classic Mode.
>
> In my web.config, I added *<add verb="*" path="*.less"
> type="dotless.Core.LessCssHttpHandler, dotless.Core" validate="false" />** *to
> *system.web >> httpHandlers*, and *<add name=".LESS"
> preCondition="integratedMode" verb="GET,HEAD" path="*.less"
> type="dotless.Core.LessCssHttpHandler, dotless.Core" />* to
> system.webServer >> handlers, but it gives an "The requested content
> appears to be script and will not be served by the static file handler"
> error.
> If I add *<mimeMap fileExtension=".less" mimeType="text" />* to *
> staticContent*, the error goes away, but the .less won't be transformed*.*
>
> Appreciate any help!
--
Check out the PageUp People Blog <http://blog.pageuppeople.com/> | Privacy
Policy <http://www.pageuppeople.com/privacy-policy> | Careers on facebook<http://www.facebook.com/PageUpPeopleCareers>

<http://www.pageuppeople.com>
Reply all
Reply to author
Forward
0 new messages