in my project, I'm using dotLess to define css. Everything works fine, but for some reason, sometimes (usually after project build or server restart, but not always) less files are not loaded (IIS returns 404 error). If I refresh my page few times, less file is loaded and after that usually everything is ok. I know, that there is another question about dotLess and ISS 404 error, but solution proposed there (adding mimeMap to web.config) did not help to resolve this issue on my site.
Does anyone know what might be causing this errors? Any help would be appreciated :)
Edit:
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<add name="RadCompression" type="Telerik.Web.UI.RadCompression"/>
</modules>
<handlers>
<add name="StyleSheetManager" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" />
<add name="ReportViewerWebControl" path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" resourceType="Unspecified" preCondition="integratedMode"/>
<add name="LessStyleCompiler" path="*.less" verb="*" type="dotless.Core.LessCssHttpHandler, dotless.Core"/>
</handlers>
<staticContent>
<mimeMap fileExtension=".less" mimeType="text/css" />
</staticContent>
</system.webServer>
Here is a fragment of web.config, that registers dotLess. My application is rather medium size, also I don't think that this may be due to my computer being slow, as the same thing is happening on many machines, no matter how powerful it is.
Because of those issues with less
files not always being sent to browser, we decided to compile them on design-time. To achieve this we are currently using Chirpy
plugin to VS2010 which handles compiling less
files and minimizing them, giving in output plain css
files. This way everything works.
Thats a pity, though, that the handler had some issues, this would make our work much nicer.