0% found this document useful (0 votes)
293 views

Error - Configuration Section Cannot Be Used at This Part

The document discusses an error encountered when deploying a site to a server in IIS. The error message refers to a configuration section being locked. The answers provide solutions such as enabling required IIS features, editing the applicationHost.config file to allow overrides, and using appcmd.exe to unlock specific configuration sections.

Uploaded by

tetkaC
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
293 views

Error - Configuration Section Cannot Be Used at This Part

The document discusses an error encountered when deploying a site to a server in IIS. The error message refers to a configuration section being locked. The answers provide solutions such as enabling required IIS features, editing the applicationHost.config file to allow overrides, and using appcmd.exe to unlock specific configuration sections.

Uploaded by

tetkaC
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 41

https://stackoverflow.

com/questions/9794985/config-error-this-configuration-section-cannot-be-used-at-this-path

Config Error: This configuration section cannot be used


at this path
Ask Question
Asked 8 years, 7 months ago
Active 3 months ago
Viewed 1.1m times
1821
365
I've encountered an error deploying a site to a server. When trying to load the home page, or access
authentication on the new site in IIS, I get the error:

Config Error: This configuration section cannot be used at this path. This happens when the section is
locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by
a location tag with overrideMode="Deny" or the legacy allowOverride="false".
More detail can be found here, in Scenario 7 matches my hex error code.

The solution given on the linked site above is to set Allow for overrideModeDefault in the section
mentioned in my error, in the applicationHost.config file. In my case,
under Security in system.webServer. But if I look at the applicationHost.config on my local computer,
where the site is properly deployed already, that section is set to Deny.

If this solution is correct, how is my local instance running just fine with the same web.config? According
to my applicationHost.config, that section should be locked, but it's not. I'd prefer to not change
the applicationHost.config file, because there are many other sites running on that server. Is there another
solution?
iisiis-7iis-8.5iis-10
share  improve this question  follow 
edited Feb 21 at 18:38

Callum Watkins
2,24222 gold badges2323 silver badges4040 bronze badges
asked Mar 20 '12 at 21:07

Alex
18.2k33 gold badges1313 silver badges2020 bronze badges
 2
If you've come here because you've gotten this error when trying to use the "Certify the web" program
(certifytheweb.com), then this blog article might be relevant: renniestechblog.com/information/… – RenniePet Dec 28
'17 at 6:03
add a comment
33 Answers
ActiveOldestVotes
3413
+50
I had the same problem. Don't remember where I found it on the web, but here is what I did:

 Click "Start button"


 in the search box, enter "Turn windows features on or off"
 in the features window, Click: "Internet Information Services"
 Click: "World Wide Web Services"
 Click: "Application Development Features"
 Check (enable) the features. I checked all but CGI.
btw, I'm using Windows 7. Many comments over the years have certified this works all the way up to
Windows 10 and Server 2019, as well.
share  improve this answer  follow 
edited Jul 29 at 20:05

TylerH
18.4k1212 gold badges6161 silver badges8282 bronze badges
answered Oct 12 '12 at 22:06

chuck97224
34.3k11 gold badge1212 silver badges33 bronze badges
 Awesome! Mine was missing .Net 4.8. Enabled it and started working. Thanks a million
man. – ChiragMS Aug 11 at 4:14
 On Windows 10 and this works for me. My project target .Net 4.8 but the IIS only has .Net 4.7, but it's
not an issue – Quad Coders Aug 21 at 14:51
398
You could also use the IIS Manager to edit those settings.

Care of this Learn IIS article:

Using the Feature Delegation from the root of IIS:


You can then control each of machine-level read/write permissions, which will otherwise give you
the overrideMode="Deny" errors.
share  improve this answer  follow 
answered Sep 9 '12 at 21:28

Overflew
6,92288 gold badges3939 silver badges6363 bronze badges
 17
To continue this, what worked for me is to (note this solution is on my DEV box and NOT a Production
system): -> Sort by Delegation -> Find all of the Read Only types -> Set them to Read/Write – Aaron Reed Jun 9
'14 at 19:50 
 1
That fixed the error message I was getting in the IIS7 manager. More surprisingly is that it also fixed the HTTP
500 clients were receiving when attempting to access the website. – Brian Gideon Aug 13 '14 at 14:39
 6
There are two seemingly different solutions posted here both of which are required. The first being, install the
"Application Server" and "Web Server" Support features. The second being, check the delegation settings and
change the offending setting to Read/Write from read only. Important to NOTE: The offending config may not
be available in the Delegation features unless the correct Support Features are installed. In my case,
"Authentication - Anonymous" was the issue, and this delegation feature did not show up until I installed the
Application Server feature. – maplemale Jul 13 '15 at 17:25
 1
This worked to me. in IIS 8.5 , Windows server 2012 R2 – ellickakudy rajeesh Apr 17 '17 at 11:58
 1
The issue for me was in the authentication section, in IIS 10 in windows 10. This link has helped
me. knowledgebase.progress.com/articles/Article/… – Ajith Jun 13 '19 at 7:29 
@BrianGideon That's because the 500 error is the general "mask" used externally to hide the exact error from
prying eyes – Roger Willcocks Mar 22 '17 at 1:38
 1
This worked to me. in IIS 8.5 , Windows server 2012 R2 – ellickakudy rajeesh Apr 17 '17 at 11:58
 The error page should give you some form of information about which feature is lacking permissions. It
may highlight the <handlers> tag for example, which would indicate you need to explicitly give read/write
permissions to the "Handler Mappings" feature. For security purposed, you may want to be specific in your
feature delegations. – Kyle Shrader Jan 29 '19 at 23:53
 Thank you for this - as @maplemale said, the authentication was set to read-only. Changing it to read-
write fixed it for me. – Arvindh Mani Mar 7 '19 at 16:37
 1
The issue for me was in the authentication section, in IIS 10 in windows 10. This link has helped
me. knowledgebase.progress.com/articles/Article/… – Ajith Jun 13 '19 at 7:29 
 It's interesting to note that, when you override your site deletagion in the IIS manager console, what it
does, is editing your actual applicationhost.config, and add that at the end of it, with "path" for the site you
need to override, followed by the sections you want to. In case you prefer editing your config file without using
the iis console. <location path="Default Web Site" overrideMode="Allow"> <system.webServer> <security>
<authentication> <anonymousAuthentication /> <basicAuthentication /> </authentication> </security>
</system.webServer> </location> – foxontherock Jun 19 '19 at 14:51
 This one solved it for me. I had to set HandlerMapping and Modules to Read/Write. IIS 10.0 and
Windows Server 2019 – Henrik Hjalmarsson Nov 20 '19 at 10:09 
add a comment
189
For Windows Server 2012 and IIS 8, the procedure is similar.

The Web Server (IIS) and Application Server should be installed, and you should also have the
optional Web Server (IIS) Support under Application Server.
share  improve this answer  follow 
answered Jan 30 '14 at 1:01

ken
15.6k33 gold badges4343 silver badges6868 bronze badges
 30
Just to clarify, the "Web Server (IIS) Support" feature checkbox is not under the 'Application
Server' node in the pic above. It will show after you perform several 'next' and pass the
Server Roles and Features on the left nav bar and get to 'Role Services' (doesn't appear in
the pic above but will appear for you after several 'next'). This drove me crazy :P  – thedrs Jun 10
'14 at 16:57
 2
for me the options only appeared after I first added the Application Server rule then
restarted the Add Roles and Features Wizard – wonster Jul 20 '15 at 1:22 
add a comment
154
Browse to “C:\Windows\System32\inetsrv\config” (you will need administrator rights here) Open
applicationHost.config

Note: In IISExpress and Visual Studio 2015 the applicationHost.config is stored in $
(solutionDir).vs\config\applicationhost.config

Find the section that showed up in the “config source” part of the error message page. For me this has
typically been “modules” or “handlers”

Change the overrideModeDefault attribute to be Allow

So the whole line now looks like:

<section name="modules" allowDefinition="MachineToApplication"


overrideModeDefault="Allow" />
After saving the file, the page loaded up fine in my browser.

Warning: Editing applicationHost.config on 64-bit Windows


share  improve this answer  follow 
edited Oct 24 '17 at 14:29

Liam
21.7k1717 gold badges9090 silver badges147147 bronze badges
answered Apr 30 '12 at 20:22

Nime Cloud
5,4911313 gold badges3737 silver badges6767 bronze badges
 2
Link for 64-bit is 404, to bad you didn't include the useful information directly in your
answer. – Erik Philips Mar 11 '14 at 20:00 
 1
This was it for me on ipSecurity on Windows 8.1 dev environment, +1.  – Moby's Stunt Double Sep
17 '14 at 21:34
 1
For 64-Bit Windows, you need to go through notepad.exe and open up %SystemRoot
%\System32\inetsrv\config to get the correct copy of the file  – Eddie Fletcher Feb 17 '15 at 2:06
 It happened to me when debugging locally in Visual Studio 2017, within the
'authentication' section. Life saver! – D Ie Nov 4 '19 at 11:33
add a comment
72
You need to unlock handlers. This can be done using following cmd command:
%windir%\system32\inetsrv\appcmd.exe unlock config -section:system.webServer/handlers
Maybe another info for people that are getting this error on IIS 8, in my case was on Microsoft Server
2012 platform. I had spend couple of hours battling with other errors that bubbled up after executing
appcmd. In the end I was able to fix it by removing Web Server Role and installing it again.
share  improve this answer  follow 
edited Dec 6 '12 at 23:27
answered Dec 6 '12 at 21:17

Gregor Primar
6,31322 gold badges2929 silver badges4646 bronze badges
 this worked for me also for system.webServer/security/ipSecurity – Bart Calixto Aug 19 '13 at 16:03
 3
Bingo. Had to run as administrator. – JackMorrissey Jan 23 '14 at 19:45
 3
I had to do this for -section:system.webServer/modules as well. – Mike Apr 28 '14 at 17:25
 1
worked for me - I was looking to set /section:access /sslFlags:SslNegotiateCert and found I had to
use the above with -section:access which reported as Unlocked section
"system.webServer/security/access"... – Shaun Wilde Oct 26 '14 at 22:54
 1
Worked for me on Windows Server 2012 R2 – Robben_Ford_Fan_boy Oct 20 '16 at 12:53
 Confirmed for Windows Server 2016 IIS Verson 10.0 – Tom McDonald May 31 '18 at 21:08
add a comment
60
1. Open "Turn windows features on or off" by: WinKey+ R => "optionalfeatures" => OK

2. Enable those features under "Application Development Features"


Tested on Win 10 - But probably will work on other windows versions as well.
share  improve this answer  follow 
edited Feb 17 at 11:13
answered Feb 23 '17 at 9:40

Aviram Fireberger
2,80233 gold badges3737 silver badges5858 bronze badges
 4
perfect. I only needed to check the ASP.NET 4.7 box and it autoselected all other
requirements it needed. Worked like a charm without even restarting the website.  – Bill
Tarbell Jan 24 '19 at 11:04
 For us IIS noobs, verifying that the correct version asp.net is actually installed should
be the first step. – mrfelis Jun 26 '19 at 16:20 
add a comment
44
I ran these two commands from an elevated command prompt:

%windir%/system32/inetsrv/appcmd unlock config /section:anonymousAuthentication

%windir%/system32/inetsrv/appcmd unlock config /section:windowsAuthentication


share  improve this answer  follow 
edited Jan 23 at 6:25

Community♦
111 silver badge
answered Nov 18 '14 at 11:22

Benji
44144 silver badges22 bronze badges
 This does not provide an answer to the question. To critique or request clarification
from an author, leave a comment below their post - you can always comment on your own
posts, and once you have sufficient reputation you will be able to comment on any post. – Rook Nov 18
'14 at 12:29
 22
@Rook this is a perfectly good answer because it doesn't blindly promote enabling
Application Development Features on the server; it states a controlled solution to a
particular scenario of getting this error. It could have been worded better. Good job boosting
the then new guy's confidence - he never came back after you and NAZIK opinionated all
over his first attempt at joining the community.  – qujck Apr 2 '15 at 18:04
 1
This fixed my problem with an application that had application-level configuration of
Windows authentication. – nebffa Mar 31 '16 at 4:12
 Nice, this did the trick where Application Development features did not  – Stephen Holt Sep
2 '16 at 12:00
 2
Works for me, but why? – Kevman Sep 25 '17 at 13:42
add a comment
41
As per my answer to this similar issue;

Try unlocking the relevant IIS configuration settings at server level, as follows:

1. Open IIS Manager
2. Select the server in the Connections pane
3. Open Configuration Editor in the main pane
4. In the Sections drop down, select the section to unlock, e.g. system.webServer > defaultPath
5. Click Unlock Attribute in the right pane
6. Repeat for any other settings which you need to unlock
7. Restart IIS (optional) - Select the server in the Conncetions pane, click Restart in the Actions pane
share  improve this answer  follow 
edited May 23 '17 at 11:47

Community♦
111 silver badge
answered Sep 6 '14 at 8:16

Chris
3,18311 gold badge2929 silver badges3535 bronze badges
 2
This solution worked for me, but the real reason was different - I had to install ASP.NET 4.5
(Add-WindowsFeature Web-Asp-Net45). – Der_Meister May 2 '16 at 5:26
 1
This worked for me.. I unlocked the section which was shown in error. For me
system.webServer > anonymousAuthentication (in web config)  – nirav Oct 14 at 18:23 
add a comment
27
This Did the trick for me, for IIS 8 Windows server 2012 R2

Go to "Turn on Features"

Then go to all default setting , Next, Next, Next etc..

Then, select as shown


below, 

Then reset IIS (optional) but do it safer side.


This is an additional solution as its a generic problem everyone have different of problem and thus
different solution. Cheers!
share  improve this answer  follow 
edited Aug 30 '17 at 12:39

Steve S
41977 silver badges1818 bronze badges
answered Jun 1 '17 at 19:47

Usman Younas
1,1531212 silver badges1818 bronze badges
 Work perfects on windows server 2016 ! – D Todorov Mar 26 at 14:22
add a comment
26
On Windows Server 2012 with IIS 8 I have solved this by enabling ASP.NET 4.5 feature:
and then following ken's answer.
share  improve this answer  follow 
edited May 23 '17 at 12:26

Community♦
111 silver badge
answered Feb 10 '14 at 17:56

Kimi
11.6k77 gold badges4747 silver badges7979 bronze badges
 2
In PowerShell: Add-WindowsFeature Web-Asp-Net45  – Der_Meister May 2 '16 at 5:26
add a comment
26
The best option is to Change Application Settings from the Custom Site Delegation
Open IIS and from the root select Feature Delegation and then select Application Settings and from
the right sidebar
select Read/Write 
 

share  improve this answer  follow 


answered Aug 16 '16 at 12:46

Dr TJ
2,8583030 silver badges4848 bronze badges
 My IIS manager does not have many of these features. I think I have to add them via
windows features. I had all of them selected (black square box) but when I click on it none
of the options were selected! I have never seen this using all Windows OS. Shame on you
Microsoft! Wasted a bunch of time. MAKE SURE ALL WINDOWS FEATURES ARE
CHECKED THAT ARE DESIRED..DO NOT USE BLACK SQUARE
SELECTION – yardpenalty.com Apr 5 '17 at 11:02 
 3
Or understand what the "black square" means when you're installing software on your
server. – LarryBud Feb 11 '18 at 4:10
 1
May I add step 2.1 -> click "custom site delegation" on the right, then choose which site you
want to allow override from the top dropdown. I suggest to not allow overwrite on all sites,
but only the site you need to. Then, continue to step 3.  – foxontherock Jun 19 '19 at 14:42
add a comment
17
To fix this open up the IIS Express applicationhost.config. This file is stored at C:\Users[your user
name]\Documents\IISExpress\config\applicationhost.config

Update for VS2015+: config file location is $(solutionDir).vs\config\applicationhost.config

Look for the following lines

<section name="windowsAuthentication" overrideModeDefault="Deny" />


<section name="anonymousAuthentication" overrideModeDefault="Deny" />
<add name="WindowsAuthenticationModule" lockItem="true" />
<add name="AnonymousAuthenticationModule" lockItem="true" />
Change those lines to

<section name="windowsAuthentication" overrideModeDefault="Allow" />


<section name="anonymousAuthentication" overrideModeDefault="Allow" />
<add name="WindowsAuthenticationModule" lockItem="false" />
<add name="AnonymousAuthenticationModule" lockItem="false" />
Save it and refresh Asp.net Page.
share  improve this answer  follow 
answered Dec 29 '16 at 7:17

Rao Adnan
1,26788 silver badges1616 bronze badges
add a comment
15
In our case on IIS 8 we found the error was produced when attempting to view Authentication" for a site,
when:

1. The server Feature Delegation marked as "Authentication - Windows" = "Read Only"


2. The site had a web.config that explicitly referenced windows authentication; e.g.,
Marking the site Feature Delegation "Authentication - Windows" = "Read/Write", the error went away. It
appears that, with the feature marked "Read Only", the web.config is not allowed to reference it at all
even to disable it, as this apparently constitutes a write.

share  improve this answer  follow 


edited Nov 18 '15 at 20:58
answered Nov 18 '15 at 20:46

IronRod
81499 silver badges1919 bronze badges
add a comment
14
Seems that with IIS Express and VS 2015, there's a copy of the applicationHost.config file at $
(solutionDir).vs\config\applicationhost.config so you'll need to make changes there. See this
link: http://digitaldrummerj.me/iis-express-windows-authentication/
Make sure these lines are changed per below:

<section name="windowsAuthentication" overrideModeDefault="Allow" />


<section name="anonymousAuthentication" overrideModeDefault="Allow" />
<add name="WindowsAuthenticationModule" lockItem="false" />
<add name="AnonymousAuthenticationModule" lockItem="false" />
share  improve this answer  follow 
answered Jan 12 '16 at 18:31

PBMe_HikeIt
56366 silver badges2121 bronze badges
add a comment
12
In my case it was that on server was not enabled "HTTP Activation" under .NET Framework Features. So
for Windows Server 2012 the solution which worked for me was:

Server Manager -> Add roles and features -> Features -> make sure that under .NET Framework of
version you want to use is checked "HTTP Activation"
share  improve this answer  follow 
answered May 24 '14 at 11:32

Pavel Nemec
15311 silver badge66 bronze badges
 not worked @Ray in Windows 7, 8, 10, 2008 server, 2012 server ? – Kiquenet Nov 6 '16 at 11:48 
add a comment
9
The Powershell way of enabling the features (Windows Server 2012 +) - trim as needed:

Install-WindowsFeature NET-Framework-Core
Install-WindowsFeature Web-Server -IncludeAllSubFeature
Install-WindowsFeature NET-Framework-Features -IncludeAllSubFeature
Install-WindowsFeature NET-Framework-45-ASPNET -IncludeAllSubFeature
Install-WindowsFeature Application-Server -IncludeAllSubFeature
Install-WindowsFeature MSMQ -IncludeAllSubFeature
Install-WindowsFeature WAS -IncludeAllSubFeature
The Powershell way of enabling the features (Windows Server 2012 +) - trim as needed:

Install-WindowsFeature NET-Framework-Core
Install-WindowsFeature Web-Server -IncludeAllSubFeature
Install-WindowsFeature NET-Framework-Features -IncludeAllSubFeature
Install-WindowsFeature NET-Framework-45-ASPNET -IncludeAllSubFeature
Install-WindowsFeature Application-Server -IncludeAllSubFeature
Install-WindowsFeature MSMQ -IncludeAllSubFeature
Install-WindowsFeature WAS -IncludeAllSubFeature
share  improve this answer  follow 
answered Mar 9 '16 at 12:32
Chris S
61.7k4949 gold badges214214 silver badges236236 bronze badges
add a comment
7
The error says that the configuration section is locked at the parent level. So it will not be directly 1
config file which will resolve the issue, we need to go through the hierarchy of the config files to see the
inheritance Check the below link to go through the File hierarchy and inheritance in IIS

https://msdn.microsoft.com/en-us/library/ms178685.aspx

So you need to check for the app config settings in the below order

1. ApplicationHost.config in C:windows\system32\inetsrv\config. Change the overrideModeDefault


attribute to be Allow.
2. ApplicationName.config or web.config in the applications directory
3. Web.config in the root directory.
4. Web.config in the specific website (My issue was found at this place).
5. Web.config of the root web (server's configuration)
6. machine.config of the machine (Root's web.config and machine.config can be found at -
systemroot\MicrosoftNET\Framework\versionNumber\CONFIG\Machine.config)
Go carefully through all these configs in the order of 1 to 6 and you should find it.
share  improve this answer  follow 
answered Mar 20 '18 at 9:15

Avil Mascarenhas
11811 silver badge88 bronze badges
add a comment
6

I needed to change the SSL settings on a subfolder when i got this nice message. In my case following
action helped me out.

Opened C:\Windows\System32\inetsrv\config\applicationHost.config

And changed the value from overrideModeDefault="Deny" to "Allow"

<sectionGroup name="system.webServer">
...
<sectionGroup name="security">
<section name="access" overrideModeDefault="Allow" />
</sectionGroup>
share  improve this answer  follow 
answered Aug 28 '15 at 23:06
Stefan Michev
3,70622 gold badges3131 silver badges2929 bronze badges
add a comment
6
I noticed one answer that was similar, but in my case I used the IIS Configured Editor to find the section I
wanted to "unlock".

Then I copied the path and used it in my automation to unlock it prior to changing the sections I wanted to
edit.
. "$($env:windir)\system32\inetsrv\appcmd" unlock config
-section:system.webServer/security/authentication/windowsAuthentication
. "$($env:windir)\system32\inetsrv\appcmd" unlock config
-section:system.webServer/security/authentication/anonymousAuthentication
share  improve this answer  follow 
answered Nov 26 '19 at 4:59

Brandon Hawbaker
11111 silver badge66 bronze badges
add a comment
4
In my case, I got this error because I was operating on the wrong configuration file.

I was doing this:

Configuration config = serverManager.GetWebConfiguration(websiteName);


ConfigurationSection serverRuntimeSection =
config.GetSection("system.webServer/serverRuntime");
serverRuntimeSection["alternateHostName"] = hostname;
instead of the correct code:

Configuration config = serverManager.GetApplicationHostConfiguration();


ConfigurationSection serverRuntimeSection =
configApp.GetSection("system.webServer/serverRuntime", websiteName);
serverRuntimeSection["alternateHostName"] = hostname;
in other words, I was trying to operate on the website's web.config instead of the global file
C:\Windows\System32\inetsrv\config\applicationHost.config, which has a section (or can have a section)
for the website. The setting I was trying to change exists only in the applicationHost.config file.
share  improve this answer  follow 
answered Jun 6 '13 at 22:45

Mark R
24322 silver badges1010 bronze badges
add a comment
4
In my case, it was something else.

When I loaded the solution in a new version of Visual Studio, VS apparently created a new project-
specific applicationhost.config file:

MySolutionDir\.vs\config\applicationhost.config

It started using the settings from the new config, instead of my already customized global IIS Express
settings. (\Users\%USER%\Documents\IISExpress\config\applicationhost.config)

In my case this was the setting that needed to be set. Of course it could be something else for you:
<section name="ipSecurity" overrideModeDefault="Allow" />
share  improve this answer  follow 
answered May 18 '17 at 20:22

Andrew
77722 gold badges99 silver badges2121 bronze badges
add a comment
3
Received this same issue after installing IIS 7 on Vista Home Premium. To correct error I changed the
following values located in the applicationHost.config file located in Windows\system32\inetsrv.

Change all of the following values located in section -->

<div mce_keep="true"><section name="handlers" overrideModeDefault="Deny" /> change this


value from "Deny" to "Allow"</div>
<div mce_keep="true"><section name="modules" allowDefinition="MachineToApplication"
overrideModeDefault="Deny" /> change this value from "Deny" to "Allow"</div>
share  improve this answer  follow 
answered Apr 4 '15 at 7:25

Bhavesh
3111 bronze badge
add a comment
3
Can You try this:

Go to application path where you're getting deny error, right click

Properties->Security tab

In that, change the permissions and check the checkbox read and write. Then it will work without any
error hopefully.
share  improve this answer  follow 
edited Feb 16 '16 at 10:30

Phiter
12.3k1414 gold badges4040 silver badges7575 bronze badges
answered Feb 16 '16 at 10:10

user5891257
3111 bronze badge
add a comment
2
For Windows Server 2008 and IIS 7, the procedure is similar. please refer to
this: http://msdn.microsoft.com/en-us/library/vstudio/bb763178(v=vs.100).aspx

in add role service, u will see "Application Development Features"

Check (enable) the features. I checked all.


share  improve this answer  follow 
answered May 12 '14 at 8:35

Scott 混合理论
1,97588 gold badges2828 silver badges5757 bronze badges
add a comment
1
I had an issue where I was putting in the override = "Allow" values (mentioned here already)......but on a
x64 bit system.......my 32 notepad++ was phantom saving them. Switching to Notepad (which is a 64bit
application on a x64 bit O/S) allowed me to save the settings.

See :

http://dpotter.net/technical/2009/11/editing-applicationhostconfig-on-64-bit-windows/

The relevant text:

One of the problems I’m running down required that I view and possibly edit applicationHost.config. This
file is located at %SystemRoot%\System32\inetsrv\config. Seems simple enough. I was able to find it from
the command line easily, but when I went to load it in my favorite editor (Notepad++) I got a file not
found error. Turns out that the System32 folder is redirected for 32-bit applications to SysWOW64. There
appears to be no way to view the System32 folder using a 32-bit app. Go figure. Fortunately, 64-bit
versions of Windows ship with a 64-bit version of Notepad. As much as I dislike it, at least it works.
share  improve this answer  follow 
answered Aug 12 '15 at 18:46

granadaCoder
20.3k77 gold badges7171 silver badges109109 bronze badges
add a comment
1
In my case I was getting this error when attempting to update the authentication settings in IIS also in
addition to browsing. I was able to remove this error by removing the authentication setting from the
web.config itself. Removing a problematic configuration section may be less invasive and preferable in
some cases than changing the server roles and features too much:

Section Removed:
<security>
<authentication>
<windowsAuthentication enabled="true" />
</authentication>
</security>
share  improve this answer  follow 
answered Aug 26 '15 at 19:40

Brandon Hawbaker
43655 silver badges44 bronze badges
add a comment
0
I had the same issue.

 Resolved it by enabling Application Server feature. Restarted iis after that.


share  improve this answer  follow 
answered May 15 '14 at 22:47

Jyo Reddy
59444 silver badges88 bronze badges
 How-to enabling Application Server feature ? in Windows Server 2008 o 2012 ? Windows 7,8,10? using
Powershell? – Kiquenet Nov 6 '16 at 11:51
add a comment
0
This worked for me Also in IIS 8 you can solve this problem by changing the server to IIS Express. Goto
debug->Properties In the Web select the server as IIS Express from the dropdown and then rebuild the
solution
share  improve this answer  follow 
answered Dec 2 '14 at 5:49

LahiruD
7311 silver badge1212 bronze badges
add a comment
0
To make a change at Application Level (Web.Config):

Please remove the Trust Level from the web.config:

Actually I was getting this error when I was trying to host my Website on the Hosting Server where I
don't have control on their Server. Removing the above line from my Application web.config solved my
issue.
share  improve this answer  follow 
answered Jun 18 '15 at 11:24
Ankit Prajapati
1,11511 gold badge1212 silver badges1919 bronze badges
add a comment
0
The following worked for me:

Go to project properties. Web tab. Set to Local IIS and set specific page.

I have Windows 7 and Visual Studio 2013.


share  improve this answer  follow 
answered Jan 28 '16 at 20:51

user3900346
17111 silver badge44 bronze badges
add a comment
0
i solved this issue

go to cmd and execute aspnet_regiis -i

hope it helpful to someone.


share  improve this answer  follow 
answered Sep 13 '16 at 5:58

DKR
4,42011 gold badge1313 silver badges1717 bronze badges
 i have tested on window 7 – DKR Nov 6 '16 at 17:02
add a comment
0
Before reinstalling iis and possibly all of your sites, go to: C:\inetpub\history

There should be number of folders (example: CFGHISTORY_0000000029). Each time a root config file
is modified, and entry is made in there. (by default backups of the last 10 modifications are saved)

Look for a backup folder that has the right date and time for it, Click on it and see if there is a file called;
applicationhost.config

Compare this to your current applicationhost.config file, or replace your current version with it (make a
backup first!!!).

I recently had my localhost iis file modified by a windows 2004 update package, which locked a few
features at the root (such as handlers), which prevented localhost sites from working - hence my search.
If you open the file in Visual Code, you can see each area that is locked with a
overrideModeDefault="Deny"

This might get you a step closer, and also a way to recover if this file ever gets corrupted.
share  improve this answer  follow 
answered Aug 9 at 4:14

Michael Khalsa
1111 bronze badge
add a comment
-1
Adding following key in registry solved my issue:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ASP.NET_64\Performance
When I tried these steps I kept getting error:

1. Search for "Turn windows features on or off"


2. Check "Internet Information Services"
3. Check "World Wide Web Services"
4. Check "Application Development Features"
5. Enable all items under this
Then i looked at event viewer and saw this error :Unable to install counter strings because the
SYSTEM\CurrentControlSet\Services\ASP.NET_64\Performance key could not be opened or
accessed. The first DWORD in the Data section contains the Win32 error code.

To fix the issue i manually created following entry in registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ASP.NET_64\Performance
and followed these steps:

1. Search for "Turn windows features on or off"


2. Check "Internet Information Services"
3. Check "World Wide Web Services"
4. Check "Application Development Features"
5. Enable all items under this
share  improve this answer  follow 
answered Feb 12 '19 at 19:34

SharpCoder
14.9k3030 gold badges123123 silver badges212212 bronze badges
add a comment
SATURDAY, 19 JANUARY 2013

Handler “ExtensionlessUrlHandler-
Integrated-4.0” has a bad module
“ManagedPipelineHandler” in its module
list
How to fix the error 'Handler “ExtensionlessUrlHandler-Integrated-4.0” has a bad module
“ManagedPipelineHandler” in its module list'.

This error occurred when I moved my moved my ASP.NET 4.5 from an old Windows 7 machine to a brand
new Windows 8 machine running IIS 8.

I was thinking I was in need of an aspnet_regiis -I but this threw back a message at me saying
"Start installing ASP.NET (4.0.30319.17929). This option is not supported
on this version of the operating system. Administrators should instead
install/uninstall ASP.NET 4.5 with IIS8 using the "Turn Windows Features
On/Off" dialog, the Server Manager management tool, or the dism.exe
command line tool. For more details please see
http://go.microsoft.com/fwlink/?LinkID=216771. Finished installing ASP.NET
(4.0.30319.17929)."

So I turned to turning windows features on/off (Win+X then hit F). I had already turned IIS on but then I had
found I hadn't done enough.

Previously when I had turned IIS on I had left it with the default but actually I needed more to get ASP.NET
4.5 to run. You need to go to:

1. Internet Information Services


2. World Wide Web Services
3. Application Development Features
4. Then check ASP.NET 4.5

This will select a few other bits for you and you should be good to go.
POSTED BY COLIN FARR AT SATURDAY, JANUARY 19, 2013  LABELS: ASP.NET, ASP.NET 4.5, IIS8, WINDOWS 8

SHARE TO TWITTER

289 COMMENTS:

1.

gonodalf1 April 2013 at 21:49

thx!

Reply

2.

keogh23 June 2013 at 14:39

Legend, cheers buddy!

Also worth pointin gout, if you (like me) installed IIS via the Web Platform Installer, then you will
see the IIS ASP.NET 4.5 option in there, WPI won't install it by default, so get it from there instead
of Windows Features if you installed via WPI.

Reply

Replies

1.

DonSchenck24 October 2013 at 18:43

This! Thanks!

Reply

3.

Virgo13926 July 2013 at 14:17

Thanks for the information!


I went on Web Platform Installer and selected the following:

- IIS: ASP.NET 4.5


- IIS: .NET Extensibility 4.5

My error then went.

Reply

4.

Reynier27 November 2013 at 00:17

Thanks

Reply

5.

Unknown5 December 2013 at 16:25

how I resolved, run the appwiz.cpl in command window , then from windows features uninstalled
.NET 4.5 and install it again.

Reply

Handler “ExtensionlessUrlHandler-Integrated-
4.0” has a bad module
“ManagedPipelineHandler” in its module list
Ask Question
Asked 8 years ago
Active 8 months ago
Viewed 266k times
259
69
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:

1) I have ASP.NET 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 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 Global.asax.
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(string.Empty, string.Empty, tw);


HttpRuntime.ProcessRequest(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
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#asp.netiisweb-applications
share  improve this question  follow 
asked Oct 31 '12 at 16:29

Ivan Peric
3,86533 gold badges1818 silver badges3030 bronze badges
 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 uptimerobot.com 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
add a comment
22 Answers
ActiveOldestVotes
24
+250
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.
edited Jan 14 '14 at 16:38
answered Nov 26 '13 at 21:35

chue x
17.7k66 gold badges5151 silver badges6767 bronze badges
 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
add a comment
651
Try to re-register ASP.NET with aspnet_regiis -i. It worked for me.

A likely path for .NET 4 (from elevated command prompt):

c:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i
http://forums.iis.net/p/1190643/2026401.aspx
share  improve this answer  follow 
edited Apr 24 '13 at 19:29
Michael Haren
94.5k3939 gold badges158158 silver badges198198 bronze badges
answered Nov 7 '12 at 9:29

danijelk
6,71122 gold badges1313 silver badges1111 bronze badges
 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
add a comment
174
If you're running into this error with Windows 8/Windows Server 2012 and .Net 4.5 follow these
instructions here: http://www.britishdeveloper.co.uk/2013/01/handler-extensionlessurlhandler.html

Go to "turn Windows features on or off" Then Internet Information Services Then World Wide Web
Services Then Application Development Features And then enable ASP.NET 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...
share  improve this answer  follow 
edited Mar 5 '14 at 20:20

Chris Pietschmann
27.6k3535 gold badges114114 silver badges160160 bronze badges
answered Feb 26 '13 at 22:54

Zach
1,74111 gold badge99 silver badges22 bronze badges
 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
add a comment
61
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:

Add Roles and Features > Server Roles > Web Server (IIS) > Web Server > Application
Development > .NET Extensibility 4.5
share  improve this answer  follow 
edited Dec 3 '19 at 17:20
answered Jul 31 '13 at 11:43

Jonathan
10.1k1616 gold badges6969 silver badges107107 bronze badges
 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 > ASP.NET 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
add a comment
49
For Windows 10 / Windows Server 2016 use the following command:

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

The suggested answers with aspnet_regiis doesn't work on Windows 10 (Creators Update and later) or
Windows Server 2016:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i
Microsoft (R) ASP.NET RegIIS version 4.0.30319.0
Administration utility to install and uninstall ASP.NET on the local machine.
Copyright (C) Microsoft Corporation. All rights reserved.
Start installing ASP.NET (4.0.30319.0).
This option is not supported on this version of the operating system. Administrators should instead
install/uninstall ASP.NET 4.5 with IIS8 using the "Turn Windows Features On/Off" dialog, the
Server Manager management tool, or the dism.exe command line tool. For more details please
see http://go.microsoft.com/fwlink/?LinkID=216771.
Finished installing ASP.NET (4.0.30319.0).
Interestingly, the "Turn Windows Features On/Off" dialog didn't allow me to untick .NET nor ASP.NET
4.6, and only the above DISM command worked. Not sure whether the featurename is correct, but it
worked for me.
share  improve this answer  follow 
edited Mar 1 '18 at 8:20
answered Jan 5 '17 at 5:57

Bart Verkoeijen
11.4k66 gold badges4646 silver badges5454 bronze badges
 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
add a comment
42
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
share  improve this answer  follow 
edited Jan 31 '16 at 12:02

Rahul
1,73711 gold badge2424 silver badges6363 bronze badges
answered Jul 31 '14 at 15:40

user3896335
44144 silver badges22 bronze badges
 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
add a comment
26
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
share  improve this answer  follow 
edited May 23 '17 at 11:54

Community♦
111 silver badge
answered Jun 23 '14 at 11:05

Neshta
2,17722 gold badges2222 silver badges3232 bronze badges
 1
FWIW, Server 2012 R2 says this option is not supported, and suggests using the Feature dialog to enable
ASP.NET 4.5 – bvj Mar 26 '15 at 5:21
 Yes, Zach's answer covers this. – Neshta Mar 26 '15 at 12:17
add a comment
13
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 Features > and
check ASP.NET 4.6
share  improve this answer  follow 
answered Jan 9 '16 at 21:35

Xaris Fytrakis
46755 silver badges1616 bronze badges
 1
Mine was IIS on Windows 2012 R2. Added the compatible ASP.NET in Server Manager > Manage > Add
Roles and Features > Role-based or feature-based installation > (select your server) > Web Server (IIS) >
Web Server > Application Development > ASP.NET 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
add a comment
6
Making this its own post because this had me going for hours.

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.

1. Find aspnet_regiis in a folder similar to this path.


c:\Windows\Microsoft.NET\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 asp.net, and then tells you it succeeded.
share  improve this answer  follow 
answered Mar 10 '17 at 15:17

shubniggurath
91611 gold badge1515 silver badges2727 bronze badges
 Worked perfectly for me. Thank you. – Mike Jun 23 '17 at 18:18
add a comment
5
Make sure that you have set your application-site version from v2.0 to v4.0 in IIS Manager:

Application Pools > Your Application > Advanced Settings > .NET Framework Version
After that, install your ASP.NET.

For 32-Bit OS (Windows):

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i
For 64-Bit OS (Windows):

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i
Restart your application-site in IIS Manager and enjoy.
share  improve this answer  follow 
answered Oct 31 '16 at 12:25

Arsman Ahmad
1,3561515 silver badges2727 bronze badges
 Yeah, I tried my best to make answer simplest. ;-) @yuyangJian – Arsman Ahmad Nov 5 '18 at 9:47
add a comment
5
I solved this problem, adding in "Turn Windows features on or off" The option ASP.NET 4.7
share  improve this answer  follow 
edited Jul 24 '19 at 0:31

kamalpreet
2,1431919 silver badges4141 bronze badges
answered Feb 22 '18 at 1:09

Edgar Chivichon
5111 silver badge33 bronze badges
add a comment
4
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.


share  improve this answer  follow 
answered Aug 19 '13 at 9:43

jwdaigle
9344 bronze badges
add a comment
4
I was challenged by the same error message, with .net 4.7 installed.
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" --> "ASP.NET 4.7" already was checked.

Further down the list, there is the "Internet Information Services" and subnote "Application Development
Features" --> "ASP.NET 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
share  improve this answer  follow 
edited Jun 20 at 9:12

Community♦
111 silver badge
answered Dec 14 '17 at 15:10

theodor.johannesen
17611 silver badge44 bronze badges
 I should add that this was a windows 10 pro edition – theodor.johannesen Dec 14 '17 at 15:11
add a comment
2
I'm working on Windows Server 2012. .NET Extensibility 4.5 feature is on. WebDAVModule removed. I
was still getting 500.21 error on ASP.NET route '/docs'.

Changing 'skipManagedModules' to false fixed the problem.

<applicationInitialization doAppInitAfterRestart="true" skipManagedModules="false">


<add initializationPage="/docs" />
</applicationInitialization>
Thanks to https://groups.google.com/forum/#!topic/bonobo-git-server/GbdMXdDO4tI
share  improve this answer  follow 
answered Nov 20 '15 at 9:42

shemanov
11322 silver badges77 bronze badges
add a comment
1
I had this problem and found that removing the following folder helped, even with the non-Express
edition.Express:

C:\Users\<user>\Documents\IISExpress
share  improve this answer  follow 
answered Feb 15 '13 at 12:13
Thomas Bratt
39.2k3434 gold badges111111 silver badges129129 bronze badges
add a comment
1
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 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.
share  improve this answer  follow 
answered Mar 30 '15 at 20:33

pirsqua
30911 gold badge22 silver badges99 bronze badges
 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
add a comment
0
You could fix it by change the "ExtensionlessUrlHandler-Integrated-4.0" type in iis to
System.Web.DefaultHttpHandler
share  improve this answer  follow 
answered May 21 '14 at 15:53

user3661608
1
add a comment
0
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
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 web.config file.

<system.webServer>
<modules>
<remove name="WebDAVModule"/>
</modules>
<handlers>
<remove name="WebDAV" />
</handlers>
<system.webServer>
This link is where I found the instructions but it's not very clear.
share  improve this answer  follow 
answered Feb 18 '15 at 10:39

Luke
19.1k2424 gold badges9797 silver badges178178 bronze badges
add a comment
0
This maybe not a usefull solution for OP but it concerns the same "error" message.

We are hosting PHP pages on IIS8.5 with .NET 4.5 installed correctly.

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 web.config : I put skipManagedModules to true, -> don't do this!

<?xml version="1.0" encoding="UTF-8"?>


<configuration>
<system.webServer>
<applicationInitialization skipManagedModules="false" doAppInitAfterRestart="true">
<add initializationPage="/" />
</applicationInitialization>
...
Although website is php, the routing to the paging is managed by the modules!!!
share  improve this answer  follow 
answered May 26 '15 at 14:54

Schwarzie2478
1,8462020 silver badges2727 bronze badges
add a comment
0
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:

share  improve this answer  follow 


answered Jan 7 '16 at 12:00

Frank
95322 gold badges1313 silver badges2626 bronze badges
add a comment
0
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.

On the hosting provider's control panel I enabled error logging for IIS and ASP.Net. And then got to
know that error actually lied in a missing cshtml.
share  improve this answer  follow 
answered Mar 5 '17 at 14:19
Dipendu Paul
2,10511 gold badge1515 silver badges1616 bronze badges
add a comment
0
Installing .NET 4.7 worked for me. I only had 3.5 installed
prior. 

share  improve this answer  follow 


answered Feb 19 at 19:37

Eric S.
1111 bronze badge
add a comment

You might also like