Handler “extensionlessurlhandler-integrated-4.0” has a bad module “managedpipelinehandler” in its module list

Query:

Handler “extensionlessurlhandler-integrated-4.0” has a bad module “managedpipelinehandler” in its module list. Please explain the answer in detail with examples.

Answer:

When encountering the error message: “Handler ‘[handlerName]’ has a bad module ‘[moduleName]’ in its module list”, it typically indicates that the specified handler is unable to find or load the specified module. The error is usually caused by a misconfiguration or a missing module installation.

Example:

Let’s take an example to understand the scenario better.

We have a website hosted on IIS (Internet Information Services) and configured to use the “extensionlessurlhandler-integrated-4.0” handler. This handler is responsible for handling requests for URLs without extensions, like “/example”, instead of the typical “/example.html” or “/example.aspx”.

One day, while browsing the website, the following error is encountered:

    HTTP Error 500.21 - Internal Server Error
    Handler "extensionlessurlhandler-integrated-4.0" has a bad module "managedpipelinehandler" in its module list
  

To resolve this error, we need to check if the necessary components are properly installed and configured.

  1. Confirm Module Existence: Check if the “managedpipelinehandler” module is installed on the server. Open the IIS Manager, navigate to the server or website level, and double-click on “Modules”. Verify if “ManagedPipelineHandler” is present in the list. If not, you can install the module through the “Server Manager” on Windows Server.
  2. Confirm Configuration: Ensure the web.config file at the application’s root directory contains the necessary configurations for the “extensionlessurlhandler-integrated-4.0” handler. Inside the system.webServer section, there should be a handlers section defining the handler with the name “extensionlessurlhandler-integrated-4.0”. Make sure the module attribute is set to “ManagedPipelineHandler”. Below is a sample configuration:
          <system.webServer>
            <handlers>
              <add name="extensionlessurlhandler-integrated-4.0" path="*" verb="GET,HEAD,POST,DEBUG" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" modules="ManagedPipelineHandler" />
            </handlers>
          </system.webServer>
        

By verifying the presence of the module and ensuring the correct configuration, the error should be resolved. Restarting the IIS server or website may be necessary for the changes to take effect.

Related Post

Leave a comment