HTTP 错误 500.19 - Internal Server Error

遇到的第一个问题:
iis7管理介面,在设置主机头时,报告如下错误:
文件名:xx\xx\xxx\web.config
行号:133
错误:无法读取配置节"system.web.extensions",因为它缺少节声明

上网查了,老外也遇到这样的问题:
Line number: 154
Error: The configuration section 'system.web.extensions' cannot be read because it is missing a section declaratio
http://our.umbraco.org/forum/getting-started/installing-umbraco/10095-Umbraco-45-Dontnetpanel-Server-Error-systemwebextensions

由于是空间服务商更换了服务器,应用了IIS7。给了我远程桌面的操作权限,运行环境先检查下:
1.已经安装.net 4.0运行库
2.设置网站基于.net4.0(连接侧边栏>应用程序池>相应网站>右键,选基本设置>选择运行库)
3.修改“托管管道模式”,Set the Manage Pipeline mode from Integrated to Classic (由集成到经典
Run website on IIS7 (Vista) in classic mode
IIS托管管道模式的集成和经典比较
问题还是没有解决。

在微软的论坛找到了解决的办法:
http://forums.asp.net/p/1547286/3784899.aspx
 

This is because config section hasn't declared. in 4.0 webconfig you have to add it manually.

<configSections>

    <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
      <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
        <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
        <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
          <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/>
          <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
          <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
          <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
        </sectionGroup>
      </sectionGroup>
    </sectionGroup>

</configSections>

--------
如上添加后,在iis7的管理介面不再报错!

但问题还没有解决,网站不能访问,404错误,找不到文件或文件夹!
经查,是如下错误:
http错误 404.2 -not found
由于web服务器上的"isapi和CGI限制"列表设置,无法提供您请求的页面。
模块:IsapiModule
通知:ExecuteReauestHandler
处理程序:PageHandlerFactory-ISAPI-4.0_32bit
错误代码:0x800704ec

解决方案:
在IIS的根节点里  有个“ISAPI和CGI限制”设置,在里面选择.net4,选择允许,默认是限制的。

另外,网站报告访问限制,在网站的“授权规则”中,设置“允许”“所有用户”

至此,网站可以正常访问了!

 

http://www.11gl.com/post/2010/12/12/umbracoe5ba94e794a8e782b9e6bbb4e8aeb0e5bd95umbracoe79a84iis7e4b8ade79a84e9858de7bdae.aspx

HTTP 错误 500.19 - Internal Server Error 是一个常见的 IIS 错误,它表示在处理请求时发生了一些配置错误。导致这个错误的原因有很多种可能性。其中,一种常见的原因是缺少或错误配置了必需的组件或模块。 根据网页搜索的结果,有一种可能是由于缺少 AspNetCoreModule 这个组件导致的。解决这个问题的方法是安装该组件。对于 .NET Core 2.2.x 版本,可以从 Microsoft 官网下载并安装该组件。下载地址可以在 https://dotnet.microsoft.com/en-us/download/dotnet/2.2 找到。 另外,也有可能是由于 .NET Core 环境的问题导致的。在这种情况下,需要安装适当的运行环境,例如 .NET 6.0 版本(适用于 Linux、macOS 和 Windows)。安装正确的运行环境可以解决这个问题。 综上所述,当出现 HTTP 错误 500.19 - Internal Server Error 时,可能的解决方法包括安装缺少的组件(比如 AspNetCoreModule)和安装适当的运行环境(比如 .NET 6.0)来修复配置错误。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [HTTP 错误 500.19- Internal Server Error 错误解决方法](https://download.csdn.net/download/weixin_38690508/12903664)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [IIS之HTTP 错误 500.19 - Internal Server Error](https://blog.csdn.net/qq_35139974/article/details/128000072)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [.Net 6.0 发布至IIS出现HTTP 错误 500.19 - Internal Server Error](https://blog.csdn.net/qq_27179087/article/details/129266321)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值