Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

500.21 Bad module "ManagedPipelineHandler" in its module list

Tags:

asp.net

iis-7

I am getting the error:

HTTP Error 500.21 - Internal Server Error Handler "CloudConnectHandler" has a bad module "ManagedPipelineHandler" in its module list

my web.config file looks like this:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <handlers>
      <add name="CloudConnectHandler" verb="*" path="CloudConnect.aspx" type="CloudConnectHandler" resourceType="Unspecified" />
    </handlers>
  </system.webServer>
  <system.web>
    <customErrors mode="Off" />
    <compilation debug="true" targetFramework="4.0" batch="false">
      <assemblies>
        <add assembly="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
      </assemblies>
    </compilation>
    <pages>
      <controls>
        <add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
      </controls>
    </pages>
        <identity impersonate="true" />
        <authentication mode="Forms" />
  </system.web>
  <system.codedom>
    <compilers>
      <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
        <providerOption name="CompilerVersion" value="v4.0" />
        <providerOption name="WarnAsError" value="false" />
      </compiler>
    </compilers>
  </system.codedom>
  <appSettings>
    <add key="CloudConnectAuthorization" value="xxxx" />
    <add key="ConnectionInfo" value="xxxx" />
    <add key="ConnectionString" value="xxxx" />
    <add key="DefaultChannel" value="xxxx" />
    <add key="LoginValidationConnectionString" value="xxxx" />
  </appSettings>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="protobuf-net" publicKeyToken="257b51d87d2e4d67" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2.0.0.640" newVersion="2.0.0.640" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

There is a lot of advice out there indicating that asp.net is not installed correctly. The usual fix is to run:

%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i

or

%windir%\Microsoft.NET\Framework\v4.0.21006\aspnet_regiis.exe -i

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.

I've spent the last couple hours trying to figure out what the problem is. I'm hoping someone can help.

like image 367
George Mastros Avatar asked Jan 03 '14 21:01

George Mastros


4 Answers

Please follow these steps:

1) Run the command prompt as administrator.

2) Type either of the two lines below in the command prompt:

%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i

or

%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i
like image 87
Armaan Avatar answered Nov 20 '22 05:11

Armaan


I ran into this error on a fresh build of Windows Server 2012 R2. IIS and .NET 4.5 had been installed, but the ASP.NET Server Role (version 4.5 in my case) had not been added. Make sure that the version of ASP.NET you need has been added/installed like ASP.NET 4.5 is in this screenshot.

ASP.NET Server Role

like image 26
Jeremy Cook Avatar answered Nov 20 '22 04:11

Jeremy Cook


To fix the problem, I tried to run

%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i

However It didn't work for me. I have to run another command line in CMD window as administrator. Here is the command:

dism /online /enable-feature /featurename:IIS-ASPNET45

or

dism /online /enable-feature /featurename:IIS-ASPNET45 /all

Hope it will help.

like image 33
Lynn Avatar answered Nov 20 '22 06:11

Lynn


Try switching to Integrated mode. See the following thread:

IIS 7, HttpHandler and HTTP Error 500.21

like image 19
Radomir Zaric Avatar answered Nov 20 '22 05:11

Radomir Zaric