0

Can someone tell me how to use dotless/LESS with MVC 5?

I tried to install dotless from NuGet using:

install-packege dotless

But I get this error when I run my project:

An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.
Most likely causes:
This application defines configuration in the system.web/httpHandlers section.

CarenRose
  • 1,266
  • 1
  • 12
  • 24
novian kristianto
  • 751
  • 3
  • 12
  • 34
  • 1
    You'll need to provide more details. Which NuGet package are you trying to use? Do you want to use the built-in Bundler or are you using a different workflow? Show us what you have tried and the errors are you getting. – Jasen Feb 19 '15 at 16:32
  • i was edit my question, please see my error – novian kristianto Feb 19 '15 at 16:40
  • 2
    This [answer](http://stackoverflow.com/a/17809889/2030565) will get rid of your HTTP 500.23 error. There is also further discussion on this configuration [here](http://forums.iis.net/t/1161020.aspx?HTTP+Error+500+23+How+do+i+solve+this+). – Jasen Feb 19 '15 at 17:49
  • Do you use twitter bootstrap? Dotless had an issue when it can't parse bootstrap ie styles. – Roman Pushkin Feb 20 '15 at 00:51
  • no i don't. i just try dotless, thanks for your advice Roman :) – novian kristianto Feb 20 '15 at 22:37

1 Answers1

0

system.web/httpHandlers is used for IIS 6, so if this is not your option (for example you use IIS 7+) just remove httpHandlers section from web.config

Or instead of removing httpHandlers just add validateIntegratedModeConfiguration option into system.webServer section.

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

These links can be useful on how to use dotless:

http://www.brendanforster.com/blog/yet-another-implement-less-in-aspnetmvc-post.html

http://www.asp.net/mvc/overview/performance/bundling-and-minification

Dotless - Can't reference less variable in separate file with MVC Bundling

Community
  • 1
  • 1
Konard
  • 2,298
  • 28
  • 21