11/10/2020 c# - Handler "ExtensionlessUrlHandler-Integrated-4.
0" has a bad module "ManagedPipelineHandler" in its module list - Stack Overflow
Handler “ExtensionlessUrlHandler-Integrated-4.0” has a bad module
“ManagedPipelineHandler” in its module list
Asked 8 years ago Active 8 months ago Viewed 266k times
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've tried to do:
259
1) I have [Link] application which has Preloader class that inherits
IProcessHostPreloadClient and does all the heavy initialization in Preload method
implementation (application is complex and it's a part of an enormous system, so it requires
69 approximately 2 minutes to establish connections to all necessary services and pre-instantiate
some Unity registrations).
2) I have a lot of work that needs to be done on application shutdown (unsubscribing,
disconnecting, disposing,...), and I guess the best place to do it is in *Application_End* method
located in [Link].
3) Everything works just fine when I have user activity (first request after the Application Pool that
contains aforementioned web application is started will cause *Application_Start* to be called and
afterwards *Application_End* is called on Application Pool stop or recycle), but problems occur
when there is no user activity and application tries to restart itself after being active for 48 hours
(configured requirement). Since there was no requests, application officially didn't get started.
Ergo, it can't be gracefully stopped since *Application_End* won't be called.
4) Now comes the messy part... I've tried to make a GET request from code at the end of the
Preload method, and it worked. But this solution seemed bad to me, even though it worked. So,
I've tried a lot of things, and the last thing I tried was this:
SimpleWorkerRequest swr = new SimpleWorkerRequest([Link], [Link], tw);
[Link](swr);
... and that has done it's purpose. *Application_Start* was called, (I've checked response, it was
containing login page that was supposed to be displayed in initial request) and on Application
Pool shutdown application ended gracefully by doing necessary work in *Application_End*.
BUT
After the application was started (preloaded and initiated) in this manner, this is what happened
when I wanted to reach application via Web browser:
HTTP Error 500.21 - Internal Server Error Handler "ExtensionlessUrlHandler-Integrated-
4.0" has a bad module "ManagedPipelineHandler" in its module list
[Link] 1/13
11/10/2020 c# - Handler "ExtensionlessUrlHandler-Integrated-4.0" has a bad module "ManagedPipelineHandler" in its module list - Stack Overflow
I am unable to figure this out. Can anybody tell me why this happens and how to fix it?
If I don't figure this out, I will go back to first solution (sending GET request from code) but this
problem will bug me since I don't even have an idea what's wrong.
c# [Link] iis web-applications
asked Oct 31 '12 at 16:29
Ivan Peric
3,865 3 18 30
what version of IIS are you using? – chue x Nov 24 '13 at 4:23
IIS 7.5 (7.5.7600.16385) – Ivan Peric Nov 24 '13 at 8:57
Not a direct answer to your question, but for other users with similar problem and asuming you have an
internet facing application: you could just use an external service like [Link] to touch your
application every X amount of time. You keep your app in running state + you have the added benefits of
the service (uptime, alerts, etc). – qbantek Feb 18 '14 at 13:56
@qbantek Even though application I am working on is not internet facing, you gave me a good idea. I could
use load balancer to do periodic touch by setting health status checking type to Simple HTTP GET. Thanks
– Ivan Peric Feb 24 '14 at 18:18
22 Answers Active Oldest Votes
The problem
24 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 [Link] applications outside an Internet Information Services (IIS)
+250 application. You can employ SimpleWorkerRequest directly or extend it.
Also, if you look at the MSDN documentation for the [Link] namespace
( SimpleWorkerRequest is in this namespace), you will also see something similar to the above
(again, emphasis is mine):
The [Link] namespace provides the functionality for hosting [Link]
applications from managed applications outside Microsoft Internet Information
Services (IIS).
The solution
[Link] 2/13
11/10/2020 c# - Handler "ExtensionlessUrlHandler-Integrated-4.0" has a bad module "ManagedPipelineHandler" in its module list - Stack Overflow
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.
edited Jan 14 '14 at 16:38 answered Nov 26 '13 at 21:35
chue x
17.7k 6 51 67
2 I was hopping to find a solution that can be implemented in code, but this is as close to a "good enough" as
it gets so I'm awarding the bounty to it. But I guess the solution that @danijelk provided will be most useful
for most people who come across this question for reason other than I specified. So this is a note for them
to take a look at it. – Ivan Peric Nov 30 '13 at 21:08
Try to re-register [Link] with aspnet_regiis -i . It worked for me.
651 A likely path for .NET 4 (from elevated command prompt):
c:\Windows\[Link]\Framework\v4.0.30319\aspnet_regiis.exe -i
[Link]
edited Apr 24 '13 at 19:29 answered Nov 7 '12 at 9:29
Michael Haren danijelk
94.5k 39 158 198 6,711 2 13 11
Thank you for your answer. I have already tried that and it didn't work. :( – – Osama khodrog Dec 3 '13 at
12:54
8 Doesn't work for Windows Server 2012. Read Zach's post on this page. – Ivan Akcheurov Dec 23 '13 at
10:49
Thanks. Worked for me doing this on a virtual machine in Azure. What I would like to know though is why
would I have to do this on a new install. Surely ASPNET registers itself when it installs right? My guess is it
has something to do with the order of installation. – David Bridge Jan 5 '15 at 15:45
4 If you are using .NET 4.5.x or 4.6.x, don't be fooled by the answer mentioning 4.0 and thinking it doesn't
apply to you. This problem can be related to the order of installation of .NET before IIS, as it was for me.
Running the command (in my case the 64 bit version) fixed it even though my application is using .NET
4.5.2. – Coxy May 17 '16 at 2:51
windows 2008, fresh install AWS microserver required me to run this command..Just for those of us who
thinks its not relevant to their system. – terary Apr 17 '19 at 23:10
[Link] 3/13
11/10/2020 c# - Handler "ExtensionlessUrlHandler-Integrated-4.0" has a bad module "ManagedPipelineHandler" in its module list - Stack Overflow
If you're running into this error with Windows 8/Windows Server 2012 and .Net 4.5 follow these
instructions here: [Link]
174
Go to "turn Windows features on or off" Then Internet Information Services Then World Wide
Web Services Then Application Development Features And then enable [Link] 4.5
This worked for me (although the wizard and wording is a little different in Windows Server 2012,
but you'll figure it out). With this being said, why this is necessary after installing everything
through the Web Platform Installer including all of the dependencies is completely beyond me...
edited Mar 5 '14 at 20:20 answered Feb 26 '13 at 22:54
Chris Pietschmann Zach
27.6k 35 114 160 1,741 1 9 2
3 Configuring Windows Server is a PITA. Why isn't there a central package management system? – Kugel
Mar 10 '14 at 2:00
if you installed iis with web platform, check for Virgo139's comment, it solved my problem easily –
castors33 Mar 20 '14 at 19:21
This was the fix for me on Windows 10 Pro build 1607, cheers! – Apogee Dec 13 '17 at 13:47
This fixed it for me on WIndows 10 as well. Worth noting that the common command-line fix
(aspnet_regiis.exe -i) is not allowed on Windows 10. – Nat Webb Jan 12 '18 at 19:57
Confirmed solution for windows 10 Pro. – Zoomzoom Oct 18 '19 at 13:18
Despite following most of the advice on this page, I was still getting problems on Windows Server
2012. Installing .NET Extensibility 4.5 solved it for me:
61
Add Roles and Features > Server Roles > Web Server (IIS) > Web Server > Application Development >
.NET Extensibility 4.5
edited Dec 3 '19 at 17:20 answered Jul 31 '13 at 11:43
Jonathan
10.1k 16 69 107
2 Thanks for spelling it out, I was staring at Web Server -> Web Server -> Web Server pipe for far too long...
:) – Gleno Jan 28 '14 at 21:26
2 Don't forget to check Roles and Features > Server Roles > Web Server (IIS) > Web Server > Application
Development > [Link] 4.6 (or 4.5 depending on your setup) – Lionet Chen Nov 1 '18 at 3:09
1 Yep, then reboot IIS Service. Worked for me! Thanks. +1 – Rusty Nail Dec 7 '18 at 2:34
For Windows 10 / Windows Server 2016 use the following command:
49 dism /online /enable-feature /featurename:IIS-ASPNET45 /all
[Link] 4/13
11/10/2020 c# - Handler "ExtensionlessUrlHandler-Integrated-4.0" has a bad module "ManagedPipelineHandler" in its module list - Stack Overflow
The suggested answers with aspnet_regiis doesn't work on Windows 10 (Creators Update and
later) or Windows Server 2016:
C:\Windows\[Link]\Framework\v4.0.30319\aspnet_regiis.exe -i
Microsoft (R) [Link] RegIIS version 4.0.30319.0
Administration utility to install and uninstall [Link] on the local machine.
Copyright (C) Microsoft Corporation. All rights reserved.
Start installing [Link] (4.0.30319.0).
This option is not supported on this version of the operating system.
Administrators should instead install/uninstall [Link] 4.5 with IIS8 using the
"Turn Windows Features On/Off" dialog, the Server Manager management tool, or
the [Link] command line tool. For more details please see
[Link]
Finished installing [Link] (4.0.30319.0).
Interestingly, the "Turn Windows Features On/Off" dialog didn't allow me to untick .NET nor
[Link] 4.6, and only the above DISM command worked. Not sure whether the featurename is
correct, but it worked for me.
edited Mar 1 '18 at 8:20 answered Jan 5 '17 at 5:57
Bart Verkoeijen
11.4k 6 46 54
This fixed it for me, I was running Windows 10 pro with the creator update. Thanks! – Samuel Poirier May 5
'17 at 13:08
Legendary answer! I had to rebuild my web server, and hadn't updated the scripts in a few years, I've
added this DISM command to my VM provisioning scripts, works like a charm. – Chris Schaller Aug 12 '18
at 23:52
dism /online /enable-feature /featurename:IIS-ASPNET45 /all Worked for me on Windows Server 2016 –
Syed Nasir Abbas Jul 10 '19 at 19:23
Thanks to you, I still have a job! :) Worked. – Scott Oct 3 '19 at 12:17
Run one of these commands :
42 For 32 Bit Windows OS:
c:\Windows\[Link]\Framework\v4.0.30319\aspnet_regiis.exe -i
For 64 Bit Windows OS:
c:\Windows\[Link]\Framework64\v4.0.30319\aspnet_regiis.exe -I
[Link] 5/13
11/10/2020 c# - Handler "ExtensionlessUrlHandler-Integrated-4.0" has a bad module "ManagedPipelineHandler" in its module list - Stack Overflow
edited Jan 31 '16 at 12:02 answered Jul 31 '14 at 15:40
Rahul user3896335
1,737 1 24 63 441 4 2
I noticed when doing this, the folder, "aspnet_client" gets added to the website under the Sites directory of
IIS Connections – eaglei22 Jul 6 '17 at 21:25
This [Link] works perfectly. But if you have 64-bit
operation system use Framework64 instead of Framework in path:
26
c:\Windows\[Link]\Framework64\v4.0.30319\aspnet_regiis.exe -i
edited May 23 '17 at 11:54 answered Jun 23 '14 at 11:05
Community ♦ Neshta
1 1 2,177 2 22 32
1 FWIW, Server 2012 R2 says this option is not supported, and suggests using the Feature dialog to enable
[Link] 4.5 – bvj Mar 26 '15 at 5:21
Yes, Zach's answer covers this. – Neshta Mar 26 '15 at 12:17
In my case (Windows 10 + IIS 10) i had to open "Turn Windows Features On or Off" and then
go to Internet Information Services > World Wide Web Services > Application Development
13 Features > and check [Link] 4.6
answered Jan 9 '16 at 21:35
Xaris Fytrakis
467 5 16
1 Mine was IIS on Windows 2012 R2. Added the compatible [Link] in Server Manager > Manage > Add
Roles and Features > Role-based or feature-based installation > (select your server) > Web Server (IIS) >
Web Server > Application Development > [Link] 4.5. As @ArsmanAhmad said a good sanity check is to
verify if your App Pool .NET CLR Version is set to v4.0. – GBU Dec 13 '16 at 11:13
Making this its own post because this had me going for hours.
6 I saw maybe a dozen of similar posts here and elsewhere about this problema and the
aspnet_regiis fix. They weren't working for me, and aspnet_regiis was acting odd, just listing
options etc.
As user ryan-anderson above indicated, you cannot enter .exe
For those less comfy with things outside IIS on the server, here's what you do in simple steps.
[Link] 6/13
11/10/2020 c# - Handler "ExtensionlessUrlHandler-Integrated-4.0" has a bad module "ManagedPipelineHandler" in its module list - Stack Overflow
1. Find aspnet_regiis in a folder similar to this path.
c:\Windows\[Link]\Framework\v4.0.30319\
2. Right-click command prompt in the start menu or wherever and tell it to run as administrator.
Using the windows "Run" feature just won't work, or didn't for me.
3. Go back to the aspnet_regiis executable. Click-drag it right into the command prompt or
copy-paste the address into the command prompt.
4. Remove, if it's there, the .exe at the end. This is key. Add the -i (space minus eye) at the end.
Enter.
If you did this correctly, you will see that it starts to install [Link], and then tells you it succeeded.
answered Mar 10 '17 at 15:17
shubniggurath
916 1 15 27
Worked perfectly for me. Thank you. – Mike Jun 23 '17 at 18:18
Make sure that you have set your application-site version from v2.0 to v4.0 in IIS Manager:
5 Application Pools > Your Application > Advanced Settings > .NET Framework Version
After that, install your [Link] .
For 32-Bit OS (Windows):
C:\Windows\[Link]\Framework\v4.0.30319\aspnet_regiis.exe -i
For 64-Bit OS (Windows):
C:\Windows\[Link]\Framework64\v4.0.30319\aspnet_regiis.exe -i
Restart your application-site in IIS Manager and enjoy.
answered Oct 31 '16 at 12:25
Arsman Ahmad
1,356 15 27
Yeah, I tried my best to make answer simplest. ;-) @yuyangJian – Arsman Ahmad Nov 5 '18 at 9:47
I solved this problem, adding in "Turn Windows features on or off" The option [Link] 4.7
[Link] 7/13
11/10/2020 c# - Handler "ExtensionlessUrlHandler-Integrated-4.0" has a bad module "ManagedPipelineHandler" in its module list - Stack Overflow
edited Jul 24 '19 at 0:31 answered Feb 22 '18 at 1:09
kamalpreet Edgar Chivichon
2,143 19 41 51 1 3
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
4 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.
answered Aug 19 '13 at 9:43
jwdaigle
93 4
I was challenged by the same error message, with .net 4.7 installed.
4 The solution was to follow one earlier mentioned post to go with the "Turn Windows feature on or
off", where the ".NET Framework 4.7 Advanced Services" --> "[Link] 4.7" already was
checked.
Further down the list, there is the "Internet Information Services" and subnote "Application
Development Features" --> "[Link] 4.7", that also needs to be checked.
When enabling this, allot of other features are enabled... I simply pressed the Ok button, and the
issue was resolved. Screendump of the windows features dialog
edited Jun 20 at 9:12 answered Dec 14 '17 at 15:10
Community ♦ [Link]
1 1 176 1 4
[Link] 8/13
11/10/2020 c# - Handler "ExtensionlessUrlHandler-Integrated-4.0" has a bad module "ManagedPipelineHandler" in its module list - Stack Overflow
I should add that this was a windows 10 pro edition – [Link] Dec 14 '17 at 15:11
I'm working on Windows Server 2012. .NET Extensibility 4.5 feature is on. WebDAVModule
removed. I was still getting 500.21 error on [Link] route '/docs'.
2
Changing 'skipManagedModules' to false fixed the problem.
<applicationInitialization doAppInitAfterRestart="true" skipManagedModules="false">
<add initializationPage="/docs" />
</applicationInitialization>
Thanks to [Link]
answered Nov 20 '15 at 9:42
shemanov
113 2 7
I had this problem and found that removing the following folder helped, even with the non-
Express [Link]:
1
C:\Users\<user>\Documents\IISExpress
answered Feb 15 '13 at 12:13
Thomas Bratt
39.2k 34 111 129
This error started happening to me out of nowhere last week, affecting the existing web sites on
my machine. I had no luck with it trying any of the suggestions here. Eventually I removed
1 WebDAV from IIS completely (Windows Features -> Internet Information Services -> World Wide
Web Services -> Common HTTP Features -> WebDAV Publishing). I did an IIS reset after this for
good measure, and my error was finally resolved.
I can only guess that a Windows update started the issue, but I can't be sure.
answered Mar 30 '15 at 20:33
pirsqua
309 1 2 9
Just had the same issue. Installed some windows updates that switched around my IIS settings. Turning off
WebDAV Publishing fixed it again. – ElliotSchmelliot Apr 9 '15 at 0:20
[Link] 9/13
11/10/2020 c# - Handler "ExtensionlessUrlHandler-Integrated-4.0" has a bad module "ManagedPipelineHandler" in its module list - Stack Overflow
You could fix it by change the "ExtensionlessUrlHandler-Integrated-4.0" type in iis to
[Link]
0
answered May 21 '14 at 15:53
user3661608
1
For me, removing WebDAV from my server caused the application to return a 503 Service
Unavailable Error message when using PUT or DELETE , so I re-installed it back again. I also tried
0 completely removing .NET Framework 4.5 and reinstalling it and also tried re-registering as
suggested but to no avail.
I was able to fix this by disabling WebDAV for the individual application pool, this stopped the 'bad
module' error when using PUT or DELETE .
Disable WebDAV for Individual App Pool:
1. Click the affected application pool
2. Find WebDAV Authoring Tools in the list
3. Click to open it
4. Click Disable WebDAV in the top right.
Ta daaaa!
I still left the remove items in my [Link] file.
<[Link]>
<modules>
<remove name="WebDAVModule"/>
</modules>
<handlers>
<remove name="WebDAV" />
</handlers>
<[Link]>
This link is where I found the instructions but it's not very clear.
answered Feb 18 '15 at 10:39
Luke
19.1k 24 97 178
This maybe not a usefull solution for OP but it concerns the same "error" message.
0 We are hosting PHP pages on IIS8.5 with .NET 4.5 installed correctly.
[Link] 10/13
11/10/2020 c# - Handler "ExtensionlessUrlHandler-Integrated-4.0" has a bad module "ManagedPipelineHandler" in its module list - Stack Overflow
We make use of the preload functionality to make sure our application is always responsive
across the board.
After a while we started getting this error at random.
In the [Link] : I put skipManagedModules to true, -> don't do this!
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<[Link]>
<applicationInitialization skipManagedModules="false" doAppInitAfterRestart="true">
<add initializationPage="/" />
</applicationInitialization>
...
Although website is php, the routing to the paging is managed by the modules!!!
answered May 26 '15 at 14:54
Schwarzie2478
1,846 20 27
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
0 Features could have solved it but the installation always failed.
I had to use the Web Platform Installer and installed the following packages:
[Link] 11/13
11/10/2020 c# - Handler "ExtensionlessUrlHandler-Integrated-4.0" has a bad module "ManagedPipelineHandler" in its module list - Stack Overflow
answered Jan 7 '16 at 12:00
Frank
953 2 13 26
I was facing this issue in a web application hosted on a shared hosting server. So obviously did
not have direct access to IIS, so could not apply many solution proposed here.
0
On the hosting provider's control panel I enabled error logging for IIS and [Link]. And then got
to know that error actually lied in a missing cshtml.
answered Mar 5 '17 at 14:19
Dipendu Paul
2,105 1 15 16
Installing .NET 4.7 worked for me. I only had 3.5 installed prior.
[Link] 12/13
11/10/2020 c# - Handler "ExtensionlessUrlHandler-Integrated-4.0" has a bad module "ManagedPipelineHandler" in its module list - Stack Overflow
answered Feb 19 at 19:37
Eric S.
11 1
[Link] 13/13