Handler “ExtensionlessUrlHandler-Integrated-4.0” has a bad module “ManagedPipelineHandler” in its module list

后端 未结 22 1610
北荒
北荒 2020-12-02 04:11

To be honest, I\'ve tried to turn a dirty trick on IIS and just when I thought that I was going to get away with it, I realized my workaround doesn\'t work. Here\'s what I\'

相关标签:
22条回答
  • 2020-12-02 04:21

    The problem

    You are using SimpleWorkerRequest in a scenario that it wasn't designed for. You are using it inside of IIS. If you look at the prior MSDN link (emphasis is mine):

    Provides a simple implementation of the HttpWorkerRequest abstract class that can be used to host ASP.NET applications outside an Internet Information Services (IIS) application. You can employ SimpleWorkerRequest directly or extend it.

    Also, if you look at the MSDN documentation for the System.Web.Hosting namespace (SimpleWorkerRequest is in this namespace), you will also see something similar to the above (again, emphasis is mine):

    The System.Web.Hosting namespace provides the functionality for hosting ASP.NET applications from managed applications outside Microsoft Internet Information Services (IIS).

    The solution

    I would recommend removing the call to SimpleWorkerRequest. Instead, you can use a Microsoft solution to make sure your web site automatically starts up after it recycles. What you need is the Microsoft Application Initialization Module for IIS 7.5. It is not complicated to configure, but you need to understand the exact options. This is why I would also recommend the Application Initialization UI for IIS 7.5. The UI is written by an MSDN blogger.

    So what exactly does the Microsoft solution do? It does what you are trying to do - IIS sends a "get" request to your website after the application pool is started.

    0 讨论(0)
  • 2020-12-02 04:21

    This https://stackoverflow.com/a/13266763/1277458 works perfectly. But if you have 64-bit operation system use Framework64 instead of Framework in path:

    c:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i
    
    0 讨论(0)
  • 2020-12-02 04:21

    I also ran into that problem. My MVC4 App is running on a Windows Server 2012 R2 with IIS 8.5. None of these posted solutions worked for me...installing the missing frameworks through IIS Features could have solved it but the installation always failed.

    I had to use the Web Platform Installer and installed the following packages:

    0 讨论(0)
  • 2020-12-02 04:22

    I know this is an oldie, but thought I might add some value. For those of us running Server Core outside of a domain (domain members can just run Server Manager remotely to add/remove features/roles), you have to resort to command lines.

    Powershell users can type "Install-WindowsFeature Web-Asp-Net45"

    That should be equivalent to using server manager.

    0 讨论(0)
  • 2020-12-02 04:24

    I solved this problem, adding in "Turn Windows features on or off" The option ASP.NET 4.7

    0 讨论(0)
  • 2020-12-02 04:26

    Run one of these commands :

    For 32 Bit Windows OS:

    c:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i
    

    For 64 Bit Windows OS:

    c:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -I
    
    0 讨论(0)
提交回复
热议问题