IIS 无法读取配置节"system.web.extensions",因为它缺少节声明

简介: 今天在本地安装iis,搭建网站,应用程序的时候报错下面的错误:服务器错误Internet Information Services 7.5错误摘要HTTP 错误 500.19 - Internal Server Error无法访问请求的页面,因为该页的相关配置数据无效。详细错误信息模块 IIS Web Core通知 BeginRequest处理程序 尚未确定错误代码 0x

今天在本地安装iis,搭建网站,应用程序的时候报错下面的错误:

服务器错误
Internet Information Services 7.5
错误摘要
HTTP 错误 500.19 - Internal Server Error
无法访问请求的页面,因为该页的相关配置数据无效。
详细错误信息
模块	IIS Web Core
通知	BeginRequest
处理程序	尚未确定
错误代码	0x80070032
配置错误	无法读取配置节“system.web.extensions”,因为它缺少节声明
配置文件	\\?\E:\12.service\AMACService\web.config
请求的 URL	http://localhost:8088/AMACService/AMACService.svc
物理路径	E:\12.service\AMACService\AMACService.svc
登录方法	尚未确定
登录用户	尚未确定
配置源
   25: 	</system.web>
   26: 	<system.web.extensions>
   27: 		<scripting>
链接和更多信息
当读取 Web 服务器或 Web 应用程序的配置文件出现问题时,就会发生此错误。在某些情况下,事件日志会包含有关导致此错误的原因的更多信息。
查看更多信息 »
运行环境先检查下:
1.已经安装.net 4.0运行库
2.设置网站基于.net4.0


3.修改“托管管道模式”,Set the Manage Pipeline mode from Integrated to Classic (由集成到经典)

然并软,问题还是没有解决。

最后在微软的论坛找到了解决的办法

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的管理介面不再报错!


本文参考:http://blog.csdn.net/maxwoods/article/details/8723221



相关文章
|
1月前
|
Java 数据库连接 开发工具
web后端-SpringCloud-Config分布配置
web后端-SpringCloud-Config分布配置
|
3月前
|
移动开发 Java HTML5
Springboot web静态资源配置
Springboot web静态资源配置
50 0
|
27天前
|
数据库
最全三大框架整合(使用映射)——struts.xml和web.xml配置
最全三大框架整合(使用映射)——数据库资源文件jdbc.properties
9 0
|
1月前
|
JavaScript Windows
VUE部署到IIS中报404错误解决方案-配置URL重写
VUE部署到IIS中报404错误解决方案-配置URL重写
|
1月前
|
Java 关系型数据库 应用服务中间件
JAVA Web项目开发eclipse工具包配置(第一天)
JAVA Web项目开发eclipse工具包配置(第一天)
|
1月前
|
安全 应用服务中间件 nginx
|
2月前
|
SQL 监控 Java
Java Web应用中数据库连接池的配置与优化
Java Web应用中数据库连接池的配置与优化
|
2月前
|
关系型数据库 MySQL 应用服务中间件
【IIS搭建网站】在本地电脑上搭建web服务器并实现外网访问
在网上各种教程和介绍中,搭建网页都会借助各种软件的帮助,比如网页运行的Apache和Nginx、数据库软件MySQL和MSSQL之类,为方便用户使用,还出现了XAMPP、PHPStudy、宝塔面板等等一系列集成服务,都是为了方便我们能快速建立网站。是不是不适用这些软件就无法建立网站了呢?答案当然是否定的,在Windows系统中实际上集成了建立网站所必须的软件环境。今天就让我们来看看,如何使用Windows自带的网站程序建立网站吧。
|
3月前
Visual Studio 2022无法连接到Web服务器IIS Express
Visual Studio 2022无法连接到Web服务器IIS Express
35 2
|
3月前
|
搜索推荐 应用服务中间件 Apache
HTTP状态码301(永久重定向)不同Web服务器的配置方法
当用户或搜索引擎向服务器发出浏览请求时,服务器返回的HTTP数据流中头信息(header)中包含状态码301,以向用户表示该资源已经永久改变了位置。
81 2