.less files are statically served on IIS6 + .NET 4 MVC3

In the .NET 4 MVC3 project, I am running a local machine on IIS6 (don't ask why). It has the correct wildcard mapping in IIS for v4 aspnet_isapi.dll, and the same applies to the .less extension.

Web.config defines these IIS6 and IIS7 httphandlers.

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

<system.webServer>
  <handlers>
    <add name="less" type="dotless.Core.LessCssHttpHandler,dotless.Core" path="*.less" verb="*" />
  </handlers>
</system.webServer>

Surfing up /path/to/nonexisting.lesscauses the correct error, which shows me a stack that works LessCssHttpHandler.

Surfing /path/to/existingfileondisk.lessjust loads the source file less than it is. It seems to me that a valid static file handler works here, although I'm not sure.

What am I missing (except for the new car;))?

+5
2

, :

IIS 6 IIS, -, .LESS ASP.NET( .LESS HTTP). - ASP.NET -

IIS6:

  • - โ†’ โ†’ โ†’ โ†’ โ†’ โ†’ :
    • = DLL asp.net(f.e. c:\windows\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll)
    • =.less
    • ", "
  • Mime: - โ†’ โ†’ HTTP โ†’ MIME โ†’ โ†’ =.less, MIME type = "text/css"
+2

.less . , . global.asax, :

public static void RegisterRoutes(RouteCollection routes)
{
    routes.IgnoreRoute("Less/{*path}");
    ...
}
+1

All Articles