Iis код ошибки 0x80070021

Содержание ошибки:

Запрашиваемая страница не доступна из-за неверной конфигурации данных для этой страницы.Данный раздел конфигурации не может использоваться на этом пути. Это происходит, когда раздел блокирован на родительском уровне. Блокировка происходит либо по умолчанию (overrideamodedefauld=»deny»), либо устанавливается непосредственно при помощи тэга расположения с OverrideMode=»deny» или наследуемым свойством allowOverride#=»false».

Файл конфигурации c:inetpubwwwrootweb.config.

Запрашиваемый адрес http://172.20.6.136/ default.htm

Источник конфигурации {modules handlers remove name=»ASP}

Эта ошибка возникает из-за проблем считывания файла конфигурации для веб-сервера или веб-приложения.

Handlers выделено красным цветом. Помогите устранить ошибку.

Дух сообщества's user avatar

задан 7 июл 2012 в 16:43

pvmed's user avatar

2

Если на машине не установлен ASP.NET, или вообще хоть что-то из фич для Application Development — секция handlers заблокирована в глобальном конфиге, за ненадобностью. Правильным решением в этом случае будет не править конфиг вручную, а доустановить соответствующие фичи:

На серверной операционке:

  1. Запустить визард Add roles and features.
  2. Выбрать ASP.NET в секции Web Server (IIS) -> Web Server -> Application Development.

На клиентской операционке:

  1. Открыть визард Turn Windows features on or off (он доступен из диалога установки / удаления программ)
  2. Выбрать ASP.NET в Internet Information Services -> World Wide Web Services -> Application Development Features

ответ дан 19 сен 2015 в 9:41

Можете попробовать этот вариант:

  1. В конфиге попробуйте убрать этот элемент, ктр Вы добавили или мешает на работу. прям удалить из сonfig файла сайта.

  2. Потом откройте IIS,

  3. зайдите в редактор конфигураций(через свой проект)Конфигурация сайта

  4. И перейдите на тот раздел ктр Вам нужен, и нажмите разблокировать с правокнопка разблокировать

  5. Потом нажмите применить(сохранить) и верните изменения в web.config-е => сохранить.

ответ дан 20 фев 2020 в 5:02

niz_sh's user avatar

niz_shniz_sh

18710 бронзовых знаков

Вот здесь есть описание вашей ошибки.

ответ дан 8 июл 2012 в 13:21

evlanoff's user avatar

evlanoffevlanoff

6223 серебряных знака7 бронзовых знаков

1

  • Remove From My Forums
  • Question

  • User-207835845 posted

    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:WebsitesWebsiteweb.config

    Requested URL

       http://localhost:80/

    Physical Path

       C:WebsitesWebsite

    Logon Method

       Not   yet determined

    Logon User

       Not   yet determined

    Config Source:

      202:     </modules>

      203:     <handlers>

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

    More Information:

    This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.

    View more information »

I’m trying to deploy web pages on IIS. When I try to browse site I got such mistake:

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

Section in my config file:

 <security>
        <authentication>
            <basicAuthentication enabled="false" />
        </authentication>
 </security>

May anybody help me to «unlock» parent section (as far as I understand).

Alex K.'s user avatar

Alex K.

171k30 gold badges263 silver badges286 bronze badges

asked Feb 23, 2015 at 13:13

Alex Gurskiy's user avatar

2

You may need to allow feature delegation.

IIS Manager -> Feature Delegation

Select «Authentication — Basic» and change it to Read/Write.

By default it is ReadOnly.

answered Jul 7, 2016 at 12:32

Vasu Inukollu's user avatar

Vasu InukolluVasu Inukollu

1201 gold badge3 silver badges10 bronze badges

I had the same kind of problem when I tried to deploy ASP.NET pages on IIS. (To be honest don´t know if exactly the same — I am using Windows 10 now, but got same kind of message).

At first it seamed complicated to fix but found out that had a really easy solution.

I Just needed to reinstal IIS at the Control Painel — but with ASP option enabled (I enabled all of the resources for development of applications).

And at the Website (basic) configuration had to select .NET v4.5 Classic.

answered Nov 18, 2018 at 3:16

ChrCury78's user avatar

ChrCury78ChrCury78

4273 silver badges8 bronze badges

Error 500.19 and file execution issues and locked on IIS 8

To resolve it I had to execute in cmd:

%windir%system32inetsrvappcmd unlock config -section:system.webServer/handlers
%windir%system32inetsrvappcmd unlock config -section:system.webServer/modules

answered Nov 17, 2015 at 8:45

user3654811's user avatar

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:inetpubwwwroot

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:inetpubwwwroot

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:inetpubwwwrootweb.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:inetpubwwwroot web.config

Requested URL: http://localhost/

Physical Path: C:inetpubwwwroot

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:inetpubwwwrootaspnetweb.config

Requested URL: http://localhost/

Physical Path: C:inetpubwwwroot

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:inetpubwwwrootaspnetweb.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: \?UNCisha2003wwwrootweb.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:inetpubwwwroot
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:Windowssystem32inetsrvsuscomp.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%system32inetsrvappcmd.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:inetpubwwwrootweb.config

Requested URL http://localhost:8081/

Physical Path C:inetpubwwwroot

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%system32inetsrvappcmd unlock config -section:system.webServer/handlers

%windir%system32inetsrvappcmd unlock config -section:system.webServer/modules

OR

Ø manually change value from «Deny» to «Allow» for below settings in %windir%system32inetsrvconfig 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:Inetpubwwwroot

Logon User: Not yet determined

Logon Method: Not yet determined

Handler: Not yet determined

Config Error: Cannot read configuration file

Config File: \? C:Inetpubwwwrootweb.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


This error occurs when installing a site locally with IIS on a windows 10 or a windows 8.1. It is not excluded that it can also occur on server operating systems.

Error Details

Module :IIS Web Core

Notice: BeginRequest

Handler: Not yet determined

Error: 0x80070021

Configuration error: This configuration section can not be used in this way. This happens when the section is locked at the parent level. Locking is either by default (overrideModeDefault = “Deny”), or installed directly by the tag location with overrideMode = “Deny” or inherited property allowOverride = “false”.

The configuration file
\?C:inetpubwwwroottestweb.config

Physical Path
C:inetpubwwwroottestmiofile

Logon Method: Not yet determined

Users who have logged on: yet to be determined

SOLUTION

You also need to install .NET and the IIS development tools

or

Понравилась статья? Поделить с друзьями:

Не пропустите эти материалы по теме:

  • Яндекс еда ошибка привязки карты
  • Imax b6 mini ошибки
  • Imap ошибка 550
  • Imap yandex ru ошибка при проверке
  • Imap gmail com на айфоне ошибка сертификата

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии