ASP。净IIS Web。配置(内部服务器错误)

时间:2022-12-01 11:29:10

I changed PC / Windows (XP -> 7) so IIS (6 -> 7,5) and trying to move my website

我改变了PC / Windows (XP -> 7),所以IIS(6 -> 7,5)尝试移动我的网站。

But I can't run my site from this server . . . error :

但是我不能从这个服务器上运行我的站点…错误:

Error description: Error HTTP 500.19 - Internal Server Error

错误描述:错误的HTTP 500.19 -内部服务器错误

The requested page is not available because of incorrect configuration data for this page.

由于此页面的配置数据不正确,请求的页面不可用。

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 \ \? \ D: \ Projects \ Flow WEB \ Sources \ web.config The requested URL-address https: / / 192.168.0.172:443 / Physical Path D: \ Projects \ Flow WEB \ Sources Logon Method Not yet determined Users who have logged on yet to be determined Channel

错误细节模块IIS Web Core Web Core通知初学者请求处理程序尚未确定错误0x80070021配置错误此配置部分不能以这种方式使用。当该部分被锁定在父级时,就会发生这种情况。默认情况下,锁定是默认的(overrideModeDefault = "Deny"),或者直接安装在带有overrideMode = "Deny"或继承的属性allowOverride = "false"的标记位置上。配置文件\ \?\ D: \ \ \ \ \ \ \ \ \网络\ \ \ \ \ \ \ \ \ \网络\ \ \ \ \ \ \ \配置所请求的url地址https: / / 192.168.0.172:443 /物理路径D: \ project \ Flow WEB \ source Logon方法尚未确定登录的用户是否已登录,尚待确定通道

Configuration

配置

<handlers>   
<remove name="WebServiceHandlerFactory-Integrated" />

...

my web.config part :

我的网络。配置的部分:

    <modules>
        <remove name="ScriptModule" />
        <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    </modules>

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

So what's wrong ?

所以怎么了?

My trying : if I make it -

我的尝试:如果我成功了

        <modules allowDefinition="MachineToApplication" overrideModeDefault="Deny">
        <remove name="ScriptModule"/>
        <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></modules>
    <handlers overrideModeDefault="Deny">
        <remove name="WebServiceHandlerFactory-Integrated"/>

I've got error : Unrecognized attribute "overrideModeDefault"

我有错误:未识别的属性“overrideModeDefault”

so I can't add it in configSections because it tells me that It already exist here.

我不能在configSections中加上它因为它告诉我它已经存在。

and when I changed IIS to Read/Write (like on picture) Ive got a new error :

当我把IIS改成读/写(如图片)时,我又犯了一个新错误:

    Error description:
Error HTTP 404.3 - Not Found
The requested page can not be displayed because of the configuration expansion. If the page is a script, add a handler. If you need to download the file, add a MIME.
Error Details
Module StaticFileModule
Notice ExecuteRequestHandler
Handler StaticFile
Error 0x80070032
The requested URL-address https: / / 192.168.0.172:80 / Default.aspx
Physical Path D: \ Projects \ Flow WEB \ Sources \ Default.aspx
Anonymous Logon
Users who have logged Anonymous
The most likely reasons:

    * Perhaps there is no comparison handlers. By default, all content is processed by a handler static files.
    * Perhaps the component to which the access is not installed.
    * Corresponding MIME map is not activated for the website or application. Warning: Do not create a MIME map for content that users should not load - say, for the pages. ASPX or files. Config.
    * If ASP.NET is not installed.

7 个解决方案

#1


19  

Check this in the web.config and change overrideModeDefault from Deny to Allow.

在网上查一下。配置和更改overrideModeDefault from Deny to Allow。

<configSections>
  <sectionGroup name="system.webServer">
    <section name="handlers" overrideModeDefault="Deny" /> 
    <section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Deny" />

You can also manage sections on web server level in your IIS management console from "Feature Delegation".

您还可以从“特性授权”管理控制台管理web服务器级别的部分。

#2


49  

I had a problem with runAllManagedModulesForAllRequests, code 0x80070021 and http error 500.19 and managed to solve it

我对runallmanagedmodulesforallrequest、代码0x80070021和http error 500.19有一个问题,并设法解决了它。

With command prompt launched as Admnistrator, go to : C:\Windows\Microsoft.NET\Framework64\v4.0.30319>

与命令提示符作为Admnistrator去:C:\Windows\ Microsoft.NET \ Framework64 \ v4.0.30319 >

execute

执行

aspnet_regiis -i

aspnet_regiis -我

bingo!

宾果!

#3


14  

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"

在搜索框中,输入“打开或关闭windows功能”

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.

检查(使)的特性。我检查了除了CGI。

IIS - this configuration section cannot be used at this path (configuration locking?)

IIS -此配置部分不能在此路径中使用(配置锁定?)

#4


1  

I experienced the same issue, and found out that the applicationdeployed was of .NET version 3.5, but the Application pool was using .NET 2.0. That caused the problem you described above. Hope it helps someone.

我遇到了同样的问题,发现应用程序部署的是。net 3.5版本,但是应用程序池使用。net 2.0。这就造成了上面描述的问题。希望它能帮助一些人。

My error:

我的错误:

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\MyService\web.config 
Requested URL http://localhost:80/MyService.svc 
Physical Path C:\inetpub\DeployService\DeployService.svc 
Logon Method Not yet determined 
Logon User Not yet determined 
 Config Source
101:        </modules>
  102:      <handlers>
  103:          <remove name="WebServiceHandlerFactory-Integrated"/>
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\DeployService\web.config 
Requested URL http://localhost:80/DeployService.svc 
Physical Path C:\inetpub\DeployService\DeployService.svc 
Logon Method Not yet determined 
Logon User Not yet determined 
 Config Source
  101:      </modules>
  102:      <handlers>
  103:          <remove name="WebServiceHandlerFactory-Integrated"/>`

#5


1  

For me it was a fresh NetCore application that was just not loading via IIS. When run standalone it was OK though.

对我来说,它是一个新的NetCore应用程序,只是没有通过IIS加载。当独立运行时,这是可以的。

I removed the <aspNetCore line and then I got a normal error message from IIS saying that NetCoreModule could not be loaded. That module is required to understand this new web.config line.

我删除了 行,然后从iis得到一个正常的错误消息,说netcoremodule不能加载。理解这个新web需要这个模块。配置线。

The error message 0x8007000d actually says that the web.config is malformed and that error shows up before the error loading module making this error message really crap. (and an unfortunate race condition problem)

错误消息0x8007000d实际上表示web。配置是错误的,这个错误在错误加载模块出现之前就出现了,这使得这个错误消息非常糟糕。(还有一个不幸的种族状况问题)

I installed the NetCoreSDK and stopped and started IIS (restart didnt work)

我安装了NetCoreSDK并停止并启动了IIS(重启不起作用)

The NetCore API started working via IIS as expected.

NetCore API按照预期通过IIS开始工作。

#6


0  

I had the same problem.

我也有同样的问题。

Solution:

解决方案:

  1. Click the right button in your site folder in "iis"
  2. 在“iis”中单击站点文件夹中的右按钮
  3. "Convert to Application".
  4. “转换为应用程序”。

#7


0  

If you have python, you can use a package called iis_bridge that solves the problem. To install:

如果您有python,您可以使用一个名为iis_bridge的包来解决这个问题。如何安装:

pip install iis_bridge

then in the python console:

然后在python控制台:

import iis_bridge as iis
iis.install()

#1


19  

Check this in the web.config and change overrideModeDefault from Deny to Allow.

在网上查一下。配置和更改overrideModeDefault from Deny to Allow。

<configSections>
  <sectionGroup name="system.webServer">
    <section name="handlers" overrideModeDefault="Deny" /> 
    <section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Deny" />

You can also manage sections on web server level in your IIS management console from "Feature Delegation".

您还可以从“特性授权”管理控制台管理web服务器级别的部分。

#2


49  

I had a problem with runAllManagedModulesForAllRequests, code 0x80070021 and http error 500.19 and managed to solve it

我对runallmanagedmodulesforallrequest、代码0x80070021和http error 500.19有一个问题,并设法解决了它。

With command prompt launched as Admnistrator, go to : C:\Windows\Microsoft.NET\Framework64\v4.0.30319>

与命令提示符作为Admnistrator去:C:\Windows\ Microsoft.NET \ Framework64 \ v4.0.30319 >

execute

执行

aspnet_regiis -i

aspnet_regiis -我

bingo!

宾果!

#3


14  

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"

在搜索框中,输入“打开或关闭windows功能”

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.

检查(使)的特性。我检查了除了CGI。

IIS - this configuration section cannot be used at this path (configuration locking?)

IIS -此配置部分不能在此路径中使用(配置锁定?)

#4


1  

I experienced the same issue, and found out that the applicationdeployed was of .NET version 3.5, but the Application pool was using .NET 2.0. That caused the problem you described above. Hope it helps someone.

我遇到了同样的问题,发现应用程序部署的是。net 3.5版本,但是应用程序池使用。net 2.0。这就造成了上面描述的问题。希望它能帮助一些人。

My error:

我的错误:

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\MyService\web.config 
Requested URL http://localhost:80/MyService.svc 
Physical Path C:\inetpub\DeployService\DeployService.svc 
Logon Method Not yet determined 
Logon User Not yet determined 
 Config Source
101:        </modules>
  102:      <handlers>
  103:          <remove name="WebServiceHandlerFactory-Integrated"/>
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\DeployService\web.config 
Requested URL http://localhost:80/DeployService.svc 
Physical Path C:\inetpub\DeployService\DeployService.svc 
Logon Method Not yet determined 
Logon User Not yet determined 
 Config Source
  101:      </modules>
  102:      <handlers>
  103:          <remove name="WebServiceHandlerFactory-Integrated"/>`

#5


1  

For me it was a fresh NetCore application that was just not loading via IIS. When run standalone it was OK though.

对我来说,它是一个新的NetCore应用程序,只是没有通过IIS加载。当独立运行时,这是可以的。

I removed the <aspNetCore line and then I got a normal error message from IIS saying that NetCoreModule could not be loaded. That module is required to understand this new web.config line.

我删除了 行,然后从iis得到一个正常的错误消息,说netcoremodule不能加载。理解这个新web需要这个模块。配置线。

The error message 0x8007000d actually says that the web.config is malformed and that error shows up before the error loading module making this error message really crap. (and an unfortunate race condition problem)

错误消息0x8007000d实际上表示web。配置是错误的,这个错误在错误加载模块出现之前就出现了,这使得这个错误消息非常糟糕。(还有一个不幸的种族状况问题)

I installed the NetCoreSDK and stopped and started IIS (restart didnt work)

我安装了NetCoreSDK并停止并启动了IIS(重启不起作用)

The NetCore API started working via IIS as expected.

NetCore API按照预期通过IIS开始工作。

#6


0  

I had the same problem.

我也有同样的问题。

Solution:

解决方案:

  1. Click the right button in your site folder in "iis"
  2. 在“iis”中单击站点文件夹中的右按钮
  3. "Convert to Application".
  4. “转换为应用程序”。

#7


0  

If you have python, you can use a package called iis_bridge that solves the problem. To install:

如果您有python,您可以使用一个名为iis_bridge的包来解决这个问题。如何安装:

pip install iis_bridge

then in the python console:

然后在python控制台:

import iis_bridge as iis
iis.install()