Iis ошибка web config

This is driving the whole team crazy. There must be some simple mis-configured part of IIS or our Web Server, but every time we try to run out ASP.NET Web Application on IIS 7.5 we get the following error…

Here’s the error in full:

HTTP Error 500.19 - Internal Server Error

The requested page cannot be accessed because the related configuration  
data for the page is invalid.

`Detailed Error Information` 
Module              IIS Web Core
Notification        Unknown
Handler             Not yet determined
Error Code          0x8007000d
Config Error
Config File         \\?\E:\wwwroot\web.config
Requested URL       http://localhost:80/Default.aspx
Physical Path 
Logon Method        Not yet determined
Logon User          Not yet determined
Config Source
   -1: 
    0: 

The machine is running Windows Server 2008 R2. We’re developing our Web Application using Visual Studio 2008.

According to Microsoft the code 8007000d means there’s a syntax error in our web.config — except the project builds and runs fine locally. Looking at the web.config in XML Notepad doesn’t bring up any syntax errors, either. I’m assuming it must be some sort of poor configuration on my part…?

Does anyone know where I might find further information about the error? Nothing is showing in EventViewer, either :(

Not sure what else would be helpful to mention…

Assistance is greatly appreciated. Thanks!

UPDATES! — POSTED WEB.CONFIG BELOW

Ok, since I posted the original question above, I’ve tracked down the precise lines in the web.config that were causing the error.

Here are the lines (they appear between <System.webServer> tags)…

    <httpHandlers>
        <remove verb="*" path="*.asmx"/>
        <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=f2cb5667dc123a56"/>
    </httpHandlers>

Note: If I delete the lines between the <httpHandlers> I STILL get the error. I literally have to delete <httpHandlers> (and the lines inbetween) to stop getting the above error.

Once I’ve done this I get a new 500.19 error, however. Thankfully, this time IIS actually tells me which bit of the web.config is causing a problem…

    <handlers>
        <remove name="WebServiceHandlerFactory-Integrated"/>
        <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory,System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=f2cb5667dc123a56"/>
        <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=f2cb5667dc123a56"/>
        <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=f2cb5667dc123a56"/>
    </handlers>

Looking at these lines it’s clear the problem has migrated further within the same <system.webServer> tag to the <handlers> tag.

The new error is also more explicit and specifically complains that it doesn’t recognize the attribute «validate» (as seen on the third line above). Removing this attribute then makes it complain that the same line doesn’t have the required «name» attribute. Adding this attribute then brings up ASP.NET error…

Could not load file or assembly
‘System.web.Extensions,
Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=f2cb5667dc123a56’ or
one of its dependencies. The system
cannot find the file specified.

Obviously I think these new errors have just arisen from me deleting the <httpHandlers> tags in the first place — they’re obviously needed by the application — so the question remains: Why would these tags kick up an error in IIS in the first place???

Do I need to install something to IIS to make it work with them?

Thanks again for any help.

WEB.CONFIG

Here’s the troublesome bits of our web.Config

<system.Web>

<!-- stuff cut out -->

    <httpHandlers>
        <remove verb="*" path="*.asmx"/>
        <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=f2cb5667dc123a56"/>
        <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=f2cb5667dc123a56"/>
        <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=f2cb5667dc123a56" validate="false"/>
    </httpHandlers>
    <httpModules>
        <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=f2cb5667dc123a56"/>
    </httpModules>
</system.web>

<system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules>
        <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=f2cb5667dc123a56"/>
    </modules>
    <remove verb="*" path="*.asmx"/>
    <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=f2cb5667dc123a56"/>
    <handlers>
        <remove name="WebServiceHandlerFactory-Integrated"/>
        <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory,System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=f2cb5667dc123a56"/>
        <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=f2cb5667dc123a56"/>
        <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=f2cb5667dc123a56"/>
    </handlers>
</system.webServer>

Before everyone reads this, I just want to say that i know that there are related threads out there, but I have either tried them or do not understand. With that being said here goes nothing…

I am trying to get a MVC Web App running in my IIS. Unfortunately, I am absolutely stuck on this error:

HTTP Error 500.19 - Internal Server Error

The Request page cannot be accessed becasue the related configuration data for 
the page is invalid.

Module: IIS Web Core
Notification: BeginRequest
Handler: Not yet determined
Error Code: 0x80070005
Config Error: Cannot read configuration file due to insufficient permissions
Config File: \foo\web.config
Request URL: http://localhost/WEBAPP
Logon Method: Not yet determined
Logon User: Not yet determined

Config Source
-1:
0:

I am not quite sure what else to do. I have also tried giving read permission to the web.config file and that did not seem to work.

If anyone has any information or would be able to help me work through this it would be much appreciated. Thanks!

Lex Li's user avatar

Lex Li

60.6k9 gold badges117 silver badges147 bronze badges

asked Sep 4, 2013 at 17:53

scapegoat17's user avatar

scapegoat17scapegoat17

5,52914 gold badges55 silver badges91 bronze badges

4

This is a noise. It is only useful if you see error code 0x8007000d in the error page and you indeed have <rewrite> tag in the config file.

In my case I needed to install the IIS URL rewrite module 2.0 because it is being used in the web.config and this was the first time running site on new machine.

Lex Li's user avatar

Lex Li

60.6k9 gold badges117 silver badges147 bronze badges

answered Aug 14, 2014 at 20:58

Josh D's user avatar

7

On this MSDN blog: Troubleshooting HTTP 500.19 Errors in IIS 7 in scenario 8 for error code 0x80070005 (E_ACCESSDENIED — General access denied error) it says:

Grant Read permission to the IIS_IUSRS group …

…. the worker process identity (and/or the IIS_IUSRS group) needs at least Read access to the directory so that it can check for a web.config file in that directory.

Wai Ha Lee's user avatar

Wai Ha Lee

8,60884 gold badges57 silver badges92 bronze badges

answered Sep 4, 2013 at 18:49

rene's user avatar

renerene

41.5k78 gold badges114 silver badges152 bronze badges

4

Please follow these step

  1. Go to Control Panel
  2. Go to Programs and Features
  3. Turn Window Feature on or off
  4. Go to Internet Information Service node
  5. Follow World wide web Services
  6. Then Please Check Application Development Feature
  7. Then Please check all Node Specially Asp or Application Framework Like Asp.net 3.5 or ASP.NET 4.5 whatever you have

answered May 19, 2017 at 6:11

Amit Yadav's user avatar

Amit YadavAmit Yadav

2112 silver badges4 bronze badges

2

I fixed this by restarting VS.

I had opened a config file in another instance of VS and apparently sth went nuts…

answered Jan 24, 2014 at 12:46

user2173353's user avatar

user2173353user2173353

4,3164 gold badges47 silver badges79 bronze badges

1

**Enable** All Features under **Application Development Features** and Refresh the **IIS**

Goto Windows Features on or Off . Enable All Features under Application Development Features and Refresh the IIS. Its Working

answered Jul 20, 2018 at 22:34

Aravind Rengasamy's user avatar

2

I had a sub folder named web.config renaming this folder resolved the issue

answered Mar 10, 2015 at 15:27

Thomas's user avatar

My issue is that I accidentally installed another site as the default site instead of the IIS default (by opening another project.) I had to remove the default site and repoint it to the default location C:\inetpub\wwwroot using my domain login as the user to bypass with then just reopened my project that I was trying to run (the one showing this error) and it was all honky dorry

answered Dec 4, 2013 at 22:41

Serj Sagan's user avatar

Serj SaganSerj Sagan

29k17 gold badges154 silver badges183 bronze badges

I was accessing the project from inside a Virtual Machine — sharing the project folder from the host OS (Windows 10). After trying many of the solutions, and even ensuring the permissions for the IIS_IUSRS are given, still I could solve this.

Eventually, I copied this folder from the host, onto a path on the guest OS, and now I can properly run that same ASP.NET project without ado. But, I did also go ahead and give the IIS_IUSRS group full control over this new dir as well… maybe that’s not really necessary in this case? I’m lazy to test that ATM.

answered May 18, 2016 at 10:53

JWL's user avatar

JWLJWL

13.6k7 gold badges57 silver badges63 bronze badges

1

Delete .vs/Config folder => work for me

answered Aug 14, 2020 at 1:22

H u y's user avatar

H u yH u y

111 bronze badge

I tried all solution above. My issue is resolved after reinstalling hosting bundle.

I installed hosting bundle before in IIS Manager installation.

I think this is caused error. Don’t know why, but, the reinstallation works.

Marco Aurelio Fernandez Reyes's user avatar

answered Dec 21, 2021 at 14:40

Nadir Hashimov's user avatar

2

If Folder getting from other, and host file is already generated on ProjectName\.vs\config folder, then it conflicts with a new one and gets this error.
So delete host file from ProjectName\.vs\config and restart project once again. It was worked for me

Gihan Saranga Siriwardhana's user avatar

answered Nov 30, 2018 at 11:01

shruti Thakker's user avatar

In my case, Server had lower version framework than your application. installed latest version framework and it fixed this issue.

answered Jan 22, 2019 at 15:57

PMC Karur's user avatar

PMC KarurPMC Karur

1252 gold badges3 silver badges10 bronze badges

In my case I had .Net core SDK 3.1.403 was installed. So I installed the corresponding .Net Core Windows Server Hosting which is .NET core 3.1.9 — Windows Server Hosting.

answered Nov 16, 2020 at 6:03

Sunilkumar Mandati's user avatar

I had this error with Visual Studion 2019, my project was NopCommerce 4.30 which is an ASP.Net Core 3.1 project. I added page «gouden-munten-buitenland» to be the starting page and I only got the error when going to that page. Turned out that Visual Studio generated an invalid applicationHost.config :

<applicationPools>
    ....
    <add name="gouden-munten-buitenland AppPool" autoStart="true" />
    <add name="gouden-munten-buitenland AppPool 2" autoStart="true" /> <!-- WRONG -->
    <add name="Nop.Web AppPool" managedRuntimeVersion="" />
    <applicationPoolDefaults managedRuntimeVersion="v4.0">
    <processModel loadUserProfile="true" setProfileEnvironment="false" />
    </applicationPoolDefaults>
</applicationPools>

and

<sites>
    ....
    <site name="Nop.Web" id="2">
    ...
    <application path="/gouden-munten-buitenland/gouden-munten-buitenland" applicationPool="gouden-munten-buitenland AppPool">
        <virtualDirectory path="/" physicalPath="C:\Usr\Stephan\Wrk\Kevelam\kNop.430\Presentation\Nop.Web" />
    </application>
    <application path="/gouden-munten-buitenland" applicationPool="gouden-munten-buitenland AppPool 2">
        <virtualDirectory path="/" physicalPath="C:\Usr\Stephan\Wrk\Kevelam\kNop.430\Presentation\Nop.Web" />
    </application> <!-- WRONG -->
    ....
    </site>
    ...
</sites>

I removed the nodes identified as ‘WRONG’ and then it worked.

answered Jan 4, 2021 at 11:55

Steef's user avatar

SteefSteef

5695 silver badges21 bronze badges

I had this problem to run restful service on IIS in Windows 10 and Windows Server 2019, finally after a lot of researches I solved the problem. After performing the following steps, the problem will most likely be solved.

  • Go to the «Windows Features» and active full features IIS («Internet Information Services» or «Web Server») and active .Net Features

  • Locate the source at «C:\inetpub\wwwroot«

  • Open IIS

    • Click «Edit Permissions» on your web after go to the security tab and give full
      access to the IIS_IUSRS
    • Go to the «Application Pool» next right click on your app pool after click on «Advanced settings» and change «Identity» to «LocalSystem«
    • Go to the «Application Pool» next right click on your app pool after click on «Basic settings» and change «.NET CLR Version» to «No Managed Code«
    • If you want to set the service to a specific port, first set it to port 80 and then edit it and set your port
  • Well now if the problem is still not solved then install the following software on the system :

    • URL Rewrite 2
    • WebPlatform
    • DotNetCore.2.0.8 Windows-Hosting
    • Dotnet-hosting 5
    • Dotnet-runtime 5
    • MicrosoftServiceFabricSDK 5
    • NET.Framework 4.8

and finally restart the system.

answered Dec 28, 2021 at 9:08

Masoud Siahkali's user avatar

Masoud SiahkaliMasoud Siahkali

5,1101 gold badge29 silver badges18 bronze badges

1

One reason, for which I face this issue was a web.config file in Images folder (on abnormal location) and IIS was trying to allow the read rights according to incorrect settings in the web.config file.

Therefore make sure your build is correctly deployed without any abnormal files specially the configs one on invalid locaiton.

answered Sep 10, 2022 at 20:28

Mukhtiar Zamin's user avatar

In the Edit Application Pool window, set the .NET CLR version to No Managed Code

answered Mar 3, 2020 at 20:10

Mykhailo Kiyan's user avatar

If your error is using a site in asp.net core, install the ASP.NET Core Windows hosting bundle.

  1. Click on the link below and select your .net core version
  2. In the following page find the link «Hosting bundle» (ctrl+f may help) and install it.

Worked a treat for me!

https://dotnet.microsoft.com/en-us/download/dotnet

answered Dec 23, 2021 at 2:50

dalcam's user avatar

dalcamdalcam

1,03711 silver badges28 bronze badges

2

In general, a 500.19 error happens due to invalid configuration data. The IIS configuration system will almost always point to the source of the problem. At the same time, sometimes it is important to examine the “Error Code” field which symbolizes the cause of problem.

Here’s an example of how a 500.19 error appears on an IIS 7.0 server:

500

Let’s talk about some of the causes for 500.19 errors. We will use the ERR.exe tool for looking up the associated error codes (MSDN says it’s for Exchange error codes but it works for Win32 error codes and many more.) To use ERR.exe tool and find what an HRESULT error code corresponds to, navigate to the folder where err.exe resides and run command: ERR ErrorCode

Note: Make sure to backup your applicationHost.config file before editing it manually, to avoid any further issuesJ. You can find the detailed instructions here

***************************************

Scenario 1

Error Message:

HTTP Error 500.19 — Internal Server Error

Description: The requested page cannot be accessed because the related configuration data for the page is invalid.

Module: StaticCompressionModule

Notification: MapRequestHandler

Handler: StaticFile

Error Code: 0x800700c1

Requested URL: http://localhost/

Physical Path: C:\inetpub\wwwroot

Logon Method: Anonymous

Logon User: Anonymous

Reason:

The Error Code in the above error message is “0x800700c1” which when translated through ERR.EXE, is

# %1 is not a valid Win32 application.

Solution:

This error normally indicates an attempt to use EITHER

Ø 32-bit executable from a 64-bit process

OR

Ø A corrupt executable

Hence the solution is to make sure that the listed module’s bitness (32bit/64bit) matches the bitness of the application Pool.

***************************************

Scenario 2

Error Message:

HTTP Error 500.19 — Internal Server Error

Description: The requested page cannot be accessed because the related configuration data for the page is invalid in the metabase on the Web server.

Error Code: 0x800700b7

Notification: BeginRequest

Module: IIS Web Core

Requested URL: http://localhost/

Physical Path: C:\inetpub\wwwroot

Logon User: Anonymous
Logon Method: Anonymous

Handler: StaticFile

Config Error: Cannot add duplicate collection entry of type ‘add’ with unique key attribute ‘name’ set to ‘header’

Config File: \\?\C:\inetpub\wwwroot\web.config

Config Source:

21: <customHeaders>

22: <add name=»header» value=»text/plain» />

23: </customHeaders>

Reason:

This problem essentially happens if there is a duplicate entry for the configuration section setting at a higher level in the configuration (i.e. in parent site/folder’s web.config or applicationHost.config file). The error message itself points out the location of duplicate entries.

Solution:

One should look in the site’s config file and compare it with applicationHost or web.config file at a higher level to check for duplicate entries as pointed by the error message.  You can either remove this entry to make the server run again, or make the entry non-duplicate by changing the collection key.

For example, the above error message was because of the same custom header defined at the IIS root level (applicationHost.config) and at the Default Website (web.config). To solve this, we can

1. Remove this entry from web.config file : <add name=»header» value=»text/plain» />

OR

2. Add remove OR clear element before this add element:

<remove name=»header»/>

OR

<clear />

***************************************

Scenario 3

Error Message:

HTTP Error 500.19 — Internal Server Error

The requested page cannot be accessed because the related configuration data for the page is invalid.

Module: IIS Web Core

Notification: BeginRequest

Handler: Not yet determined

Error Code: 0x8007000d

Config Error: Configuration file is not well-formed XML

Config File: \\?\ C:\inetpub\wwwroot \web.config

Requested URL: http://localhost/

Physical Path: C:\inetpub\wwwroot

Logon User: Not yet determined
Logon Method: Not yet determined

Config Source

3: <system.webServer>

4: </handlers>

5: <remove name=»StaticFile»/>

Reason:

That error message goes on to say what exactly is bad about your configuration file, hence you should refer the “Config Error” and “Config Source” sections. This problem occurs because the ApplicationHost.config file or the Web.config file contains a malformed or unsupported XML element.

Solution:

Delete the malformed XML element from the ApplicationHost.config file or from the Web.config file as indicated by the error message.

There are couples of instances that we have come across where the error code remains 0x8007000d, but the cause of issue was interesting.

In one scenario, we had a virtual directory pointing to a UNC share content. This same above 500.19 error was caused because of wrong password specified in the “Connect as..” setting. So make sure to provide the right credentials under “Connect as..” .

Another instance where the error code remained “0x8007000d” but the “Config Error” didn’t complain the mal formed XML, rather was about Configuration section encryption.

HTTP Error 500.19 – Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.

Module : ConfigurationValidationModule

Notification: BeginRequest

Handler : PageHandlerFactory-Integrated

Error Code: 0x8007000d

Config Error: Configuration section encryption is not supported

Config File: \\?\C:\inetpub\wwwroot\aspnet\web.config

Requested URL: http://localhost/

Physical Path: C:\inetpub\wwwroot

Logon User: Not yet determined
Logon Method: Not yet determined

<identity configProtectionProvider=»RsaProtectedConfigurationProvider»>

<EncryptedData Type=http://www.w3.org/2001/04/xmlenc#Element

As the error suggests, the error is because IIS7 configuration system only supports per-attribute encryption; it does not support per-section encryption. For more details, refer Section level encryption of ASP.NET settings in IIS 7

***************************************

Scenario 4

Error Message:

HTTP 500.19 — Internal Server Error

Module: IIS Web Core

Notification: BeginRequest

Handler: Not yet determined

Error Code: 0x8007010b

Config Error: Cannot read configuration file

Config File \\?\C:\inetpub\wwwroot\aspnet\web.config

Logon Method: Not yet determined

Reason:

ERROR CODE: 0x8007010b translates to “ERROR_DIRECTORY — The directory name is invalid.”

Solution:

As the error indicates, IIS is not able to find the content directory. For this error, we can run Process Monitor OR use Failed Request Tracing to get the Directory name where it fails. And then verify if that directory name/path is valid or not. If it does exist, then verify the NTFS permissions on that directory for account that is being used to access it.

We have seen this error when the site content is pointing to some Non-NTFS File system. In such cases, it is advisable to test it by placing the content on a Windows/NTFS share.

***************************************

Scenario 5

Error Message:

HTTP Error 500.19 — Internal Server Error
Description: The requested page cannot be accessed because the related configuration data for the page is invalid.
Error Code: 0x8007052e
Notification: BeginRequest
Module: IIS Web Core
Requested URL: http://localhost/
Logon User: Not yet determined
Logon Method: Not yet determined
Handler: Not yet determined
Config Error: Cannot read configuration file
Config File: \\?\UNC\isha2003\wwwroot\web.config

Reason:

The error code in this 500.19 error message is 0x8007052e which indicates:

ERROR_LOGON_FAILURE — Logon failure: unknown user name or bad password.

Solution:

To resolve this error, follow the steps given in the KB 934515

***************************************

Scenario 6

Error Message:

HTTP Error 500.19 — Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid. Module DynamicCompressionModule
Notification SendResponse
Handler StaticFile
Error Code 0x8007007e
Requested URL http://localhost:80/
Physical Path C:\inetpub\wwwroot
Logon Method Anonymous
Logon User Anonymous

Reason:

Error Code 0x8007007e is:

ERROR_MOD_NOT_FOUND — The specified module could not be found.

This problem occurs because the ApplicationHost.config file or the Web.config file references a module that is invalid or that does not exist. To resolve this problem: In the ApplicationHost.config file or in the Web.config file, locate the module reference or the DLL reference that is invalid, and then fix the reference. To determine which module reference is incorrect, enable Failed Request Tracing, and then reproduce the problem.

For above specific error (mentioned in this example), DynamicCompressionModule module is causing the trouble. This is because of the XPress compression scheme module (suscomp.dll) which gets installed with WSUS. Since Compression schemes are defined globally and try to load in every application Pool, it will result in this error when 64bit version of suscomp.dll attempts to load in an application pool which is running in 32bit mode.

This module entry looks like:

<scheme name=»xpress» doStaticCompression=»false» doDynamicCompression=»true»
dll=»C:\Windows\system32\inetsrv\suscomp.dll» staticCompressionLevel=»10″
dynamicCompressionLevel=»0″ />

Hence to get rid of this problem:

Ø Remove/Disable the XPress compression scheme from the configuration using the command below:

%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpCompression /-[name=’xpress’]

OR

Ø Add an attribute of «precondition= «64bitness» for this module entry so that it loads only in 64bit application pools

Refer this blog for more details on Preconditions in IIS7

OR

Ø Use a 32bit version of suscomp.dll

***************************************

Scenario 7:

Error Message:

HTTP Error 500.19 — Internal Server Error

The requested page cannot be accessed because the related configuration data for the page is invalid. Detailed Error Information

Module IIS Web Core

Notification BeginRequest

Handler Not yet determined

Error Code 0x80070021

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».

Config File \\?\C:\inetpub\wwwroot\web.config

Requested URL http://localhost:8081/

Physical Path C:\inetpub\wwwroot\

Logon Method Not yet determined

Logon User Not yet determined

Config Source

144: </modules>

145: <handlers>

146: <remove name=»WebServiceHandlerFactory-Integrated»/>

Reason:

ERROR CODE: 0x80070021 is

ERROR_LOCK_VIOLATION The process cannot access the file because another process has locked a portion of the file.

Solution:

There are usually a few more lines in that error response that points to the exact line in the config file (and hence the locked section) that has the problem. You will either have to unlock that section or not use it in your application’s web.config file.

For e.g., one can lock/unlock handlers/modules sections by either

Ø use appcmd.exe

%windir%\system32\inetsrv\appcmd unlock config -section:system.webServer/handlers

%windir%\system32\inetsrv\appcmd unlock config -section:system.webServer/modules

OR

Ø manually change value from «Deny» to «Allow» for below settings in %windir%\system32\inetsrv\config\ applicationHost.config

<section name=»handlers» overrideModeDefault=»Deny» />

<section name=»modules» allowDefinition=»MachineToApplication» overrideModeDefault=»Deny»/>

You can also configure the locking via IIS manager UI.

For more details refer: Locking in IIS 7.0 Configuration

In above error message, the error occurred on the handlers section at:

<remove name=»WebServiceHandlerFactory-Integrated»/>”

This usually indicates that ASP.NET is either not installed or has corrupted/incomplete installation because installation of asp.net unlocks that section. Hence if this is the case, one should install asp.net feature from Server Manager (Under Web Server Role in Windows Server 2008 and in Program Features-> Application server in Vista/Windows7). This KB929772 talks about the ASP.NET installation failure reason.

***************************************

Scenario 8

Error Message:

HTTP Error 500.19 — Internal Server Error

Description: The requested page cannot be accessed because the related configuration data for the page is invalid.

Error Code: 0x80070005

Notification: BeginRequest

Module: IIS Web Core

Requested URL: http://localhost

Physical Path: C:\Inetpub\wwwroot

Logon User: Not yet determined

Logon Method: Not yet determined

Handler: Not yet determined

Config Error: Cannot read configuration file

Config File: \\?\ C:\Inetpub\wwwroot\web.config

Reason:

The error code 0x80070005 is:

E_ACCESSDENIED — General access denied error

The “Config error” portion of the error may indicate this too, via message: “Config Error Cannot read configuration file due to insufficient permissions ”

Solution:

Grant Read permission to the IIS_IUSRS group for the ApplicationHost.config file or for the Web.config file indicated in the error message. Even if there is no config file at that location, the worker process identity (and/or the IIS_IUSRS group) needs at least Read access to the directory so that it can check for a web.config file in that directory.  If it’s a UNC share, you need to either run your app-pool as an account that has sufficient permission to the UNC share or configure the virtual directory with a user that has sufficient permission to the share.

If you still see the issue, run the Process Monitor tool, reproduce the error and look for “Access Denied” in the “Result” column. You can then configure the required permissions accordingly.

Other Related Articles:
Troubleshooting HTTP 401.3 errors (Access denied) with Process Monitor

Troubleshooting common permissions and security-related issues in ASP.NET

***************************************

Scenario 9

There’s one intermittent 500.19 error we’ve observed while using Shared Configuration with multiple web servers in a load balanced environment and the configuration files stored on a common UNC file share. In this scenario, if the file share content goes offline, the web server will stop responding. Furthermore, when the file share comes up again, the web server will still not detect it and will fail with a 500.19 error. In order to recover from this situation, you must restart IIS. The solution to this problem is described in this KB

***************************************

Other references:

Error message when you visit a Web site that is hosted on IIS 7.0: «HTTP Error 500.19 – Internal Server Error»

You receive an error message when you try to view a Web page from a Web site that uses pass-through authentication in Internet Information Services 7.0

Troubleshoot IIS7 errors like a pro


After «more time than was prudent» debugging an issue with handlers not being applied correctly, I’ve determined that the SiteRoot/web.config shown in IIS Manager is not actually used by IIS.

How do I know this? I’ve replaced Web.config with invalid XML — the site continues to run with default handlers and modules, while IIS Manager will, rightfully, throw an error on the invalid XML.

Information:

  • The test/invalid Web.config is not being read by IIS, or it would fail to parse.
    • Static content is being served, with a root relative to the Web.config.
  • The test/invalid Web.config is being read by IIS Manager, as it fails to parse/load (as expected).
    • Using «Explore» correctly opens up the folder the Web.config file exists in.
  • The NTFS case-sensitivity is disabled per this answer. The same issue persists with both web.config and Web.config casings.
  • The AppPool is running under a local account and the effective NTFS access has been verified.
  • There are no related Windows Application or System event logs indicating there was an error reading or parsing the configuration.

What might be occurring, and what further diagnosis can be done?

asked Oct 1, 2020 at 20:10

user2864740's user avatar

While I have no idea what the initial cause was..

One of these two things ‘fixed’ it. Unfortunately, the specific change was change was not identified.

  1. Copied inetsvr’s applicationHost.config from another machine.

    While this might have affected various globalModules, etc, the same
    AppPool and Site definitions were used as they are installed through
    automation
    .

    Due to this being a ‘recovery’ as VS Code truncated the original file, it is not feasible to diff for the relevant changes.

  2. Deleted the contents of C:\inetpub\temp\appPools.

    Due to the timing of changes, I cannot confirm if this operation was more/less relevant than using a different applicationHost.

answered Oct 1, 2020 at 22:40

user2864740's user avatar

1

You must log in to answer this question.

Not the answer you’re looking for? Browse other questions tagged

.

  • Remove From My Forums
  • Question

  • User-682795691 posted

    I have a Web Core API and a Web application that uses it.

    When I deploy to my web server (IIS 7.5) and run my web application I find that it is blocked from communicating with my Web API with an 500 — Internal server error response.

    So I look at the IIS settings (version 7.5) and when I try to look at the authentication settings for the Web Core API, I get this error message.

    «There was an error while performing this operation»

    Details:

    Filename: \\?\C:\Inetpub\wwwroot\SIR\web.config

    And the authentication settings are not retreived.

Понравилась статья? Поделить с друзьями:
  • Iis ошибка http 503 услуга недоступна
  • Ignition on ошибка ягуар
  • Iis ошибка 500 внутренняя ошибка сервера
  • Iis ошибка 405
  • Ignition on ошибка jaguar xf