Handler “Elmah” has a bad module “ManagedPipelineHandler” in its module list

Elmah - awesome library for asp.net that enable to log exceptions (as well as those that end up with Yellow screen of death). It comes with a great module and a handler used to view error logs. It really helps a lot. I used that in literally every web project I have made.

Yesterday, I was installing new project on fresh Windows Server 2008 R2.

I ended up with an error: Handler “Elmah” has a bad module “ManagedPipelineHandler” in its module list.

After hour of goggling I couldn’t find a solution that would solve my problem (reinstalling asp.net, changing ISAPI restrictions). Nothing helped. Then I have found out that problem lies in IIS7 configuration part in my web.config.

<system.webServer>
  <modules>
    <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah"/>
  </modules>
  <handlers>
    <add name="Elmah" path="elmah.axd" verb="POST,GET,HEAD" type="Elmah.ErrorLogPageFactory, Elmah" preCondition="integratedMode"   />
  </handlers>
</system.webServer>

My set up was done based on dotnetslackers article, and I simply copied their pre IIS7 configuration to system.webserver part. The part that I was missing was preCondition=”integratedMode” attribute for a handler.

Hope that helps someone

Share

Related posts:

  1. Manually forcing ELMAH to log exception
  2. Redirect to new domain after rebranding with IIS Url Rewrite Module
  3. ASP.NET MVC 1.0 issue within HtmlHelper.GetModelStateValue method
  • Theodros Begashaw

    great post. I received the exact same error message and solved it by using your recommendation

  • Jennifer

    Thanks! This helped me, too! :)

  • Marnee Dearman

    This helped me thank you!