How to fix the “Handler “dotless” has a bad module “ManagedPipelineHandler” in its module list” problem

by Steve French in How To Fix on June 27, 2012

The Problem

'Software Bugs' photo (c) 2006, Martin Maciaszek - license: https://creativecommons.org/licenses/by/2.0/You are working away, using the wonderful dotless plugin for IIS, and also taking advantage of the great features of the Less Css System.  Then, for no good reason, your .less file stops loading.  You create all sorts of new Mime types and reboot the server, but nothing seems to work, how do you fix it?

The Cause

Upon closer examination, you uncover the following error

HTTP Error 500.21 – Internal Server Error
Handler “dotless” has a bad module “ManagedPipelineHandler” in its module list

even though you have not changed anything about dotless.

The Solution

At some point the application pool has changed.  Just change it back to a more recent version (I was using a custom application pool) and the problem goes away.