ASP.NET IIS Web.config [内部服务器错误]

cnd*_*cnd 35 asp.net iis web-config

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

但我无法从此服务器运行我的网站...错误:

错误说明:错误HTTP 500.19 - 内部服务器错误

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

错误详细信息模块IIS Web核心通知BeginRequest处理程序尚未确定错误0x80070021配置错误此配置部分不能以这种方式使用.当该部分在父级别锁定时会发生这种情况.默认情况下锁定(overrideModeDefault ="Deny"),或者使用overrideMode ="Deny"或继承属性allowOverride ="false"直接由标记位置安装.配置文件\ \?\ D:\ Projects\Flow WEB\Sources\web.config请求的URL地址https:// 192.168.0.172:443 /物理路径D:\ Projects\Flow WEB\Sources登录方法尚未确定已登录的用户尚未确定的频道

组态

<handlers>   
<remove name="WebServiceHandlerFactory-Integrated" />
Run Code Online (Sandbox Code Playgroud)

...

我的web.config部分:

    <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>
Run Code Online (Sandbox Code Playgroud)

那有什么不对?

我的尝试:如果我做到了 -

        <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"/>
Run Code Online (Sandbox Code Playgroud)

我有错误:无法识别的属性"overrideModeDefault"

所以我无法在configSections中添加它,因为它告诉我它已经存在于此处.

当我将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.
Run Code Online (Sandbox Code Playgroud)

小智 49

我遇到runAllManagedModulesForAllRequests的问题,代码0x80070021和http错误500.19并设法解决它

使用命令提示符作为Admnistrator启动,请转到:C:\ Windows\Microsoft.NET\Framework64\v4.0.30319>

执行

aspnet_regiis -i

答对了!

  • 在Windows 8上,此命令现在告诉您使用控制面板打开/关闭Windows功能.它是IIS\World Wide Web Services\Application Development Features\ASP.NET 4.5.当我安装了已安装IIS的VS2012时,我感到很惊讶.我想,更多的奶酪. (13认同)
  • 詹姆斯的解决方案很有效.由于我是Server 2012的新手,以下是我所做的步骤:服务器管理器>仪表板> 2添加角色和功能>基于角色或基于功能的安装> [选择服务器]>向下展开树:Web服务器(IIS )/ Web服务器/应用程序开发/ ASP.NET 4.5这也增加了几个其他选项. (8认同)

Bra*_*nov 17

在web.config检查并改变overrideModeDefaultDenyAllow.

<configSections>
  <sectionGroup name="system.webServer">
    <section name="handlers" overrideModeDefault="Deny" /> 
    <section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Deny" />
Run Code Online (Sandbox Code Playgroud)

您还可以从"功能委派"管理IIS管理控制台中Web服务器级别的部分.

  • 糟糕:)我需要在IIS上安装ASP.NET (14认同)

小智 15

我有同样的问题.不记得我在网上找到它的地方,但这就是我所做的:

点击"开始"按钮

在搜索框中,输入"打开或关闭Windows功能"

在功能窗口中,单击:"Internet信息服务"

点击:"万维网服务"

单击:"应用程序开发功能"

检查(启用)功能.我检查了除CGI以外的所有内容

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