title: 500.21 Bad module "ManagedPipelineHandler" in its module list
body: <p>I am getting the error:</p>
  
  <p>HTTP Error 500.21 - Internal Server Error
  Handler "CloudConnectHandler" has a bad module "ManagedPipelineHandler" in its module list</p>
  
  <p>my web.config file looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
    &lt;system.webServer&gt;
      &lt;handlers&gt;
        &lt;add name="CloudConnectHandler" verb="*" path="CloudConnect.aspx" type="CloudConnectHandler" resourceType="Unspecified" /&gt;
      &lt;/handlers&gt;
    &lt;/system.webServer&gt;
    &lt;system.web&gt;
      &lt;customErrors mode="Off" /&gt;
      &lt;compilation debug="true" targetFramework="4.0" batch="false"&gt;
        &lt;assemblies&gt;
          &lt;add assembly="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /&gt;
          &lt;add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /&gt;
          &lt;add assembly="Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /&gt;
        &lt;/assemblies&gt;
      &lt;/compilation&gt;
      &lt;pages&gt;
        &lt;controls&gt;
          &lt;add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" /&gt;
        &lt;/controls&gt;
      &lt;/pages&gt;
          &lt;identity impersonate="true" /&gt;
          &lt;authentication mode="Forms" /&gt;
    &lt;/system.web&gt;
    &lt;system.codedom&gt;
      &lt;compilers&gt;
        &lt;compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"&gt;
          &lt;providerOption name="CompilerVersion" value="v4.0" /&gt;
          &lt;providerOption name="WarnAsError" value="false" /&gt;
        &lt;/compiler&gt;
      &lt;/compilers&gt;
    &lt;/system.codedom&gt;
    &lt;appSettings&gt;
      &lt;add key="CloudConnectAuthorization" value="xxxx" /&gt;
      &lt;add key="ConnectionInfo" value="xxxx" /&gt;
      &lt;add key="ConnectionString" value="xxxx" /&gt;
      &lt;add key="DefaultChannel" value="xxxx" /&gt;
      &lt;add key="LoginValidationConnectionString" value="xxxx" /&gt;
    &lt;/appSettings&gt;
    &lt;runtime&gt;
      &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="protobuf-net" publicKeyToken="257b51d87d2e4d67" culture="neutral" /&gt;
          &lt;bindingRedirect oldVersion="0.0.0.0-2.0.0.640" newVersion="2.0.0.640" /&gt;
        &lt;/dependentAssembly&gt;
      &lt;/assemblyBinding&gt;
    &lt;/runtime&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>There is a lot of advice out there indicating that asp.net is not installed correctly.  The usual fix is to run: </p>
  
  <pre><code>%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i
  </code></pre>
  
  <p>or</p>
  
  <pre><code>%windir%\Microsoft.NET\Framework\v4.0.21006\aspnet_regiis.exe -i
  </code></pre>
  
  <p>I have run both, without any errors.  I have restarted IIS, but the problem still persists.  The site is using an application pool.  The app pool is started, .net framework = 4.0, Managed Pipeline = Classic, Identity = LocalSystem.</p>
  
  <p>I've spent the last couple hours trying to figure out what the problem is.  I'm hoping someone can help.</p>