无法识别的配置节 system.serviceModel 解决方案

Posted ox_fly

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了无法识别的配置节 system.serviceModel 解决方案相关的知识,希望对你有一定的参考价值。

错误消息 : 无法识别的配置节 system.serviceModel 解决方案。

源错误 :

行 135: </roleManager>
行 136: </system.web>
行 137: <system.serviceModel>
行 138: <extensions>
行 139: <behaviorExtensions>

源文件 : C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Config

/machine.config 行 : 137

版本信息 : Microsoft .NET Framework 版本 :4.0.50727.3053; ASP.NET 版本 :4.0.50727.3053

 

出现这个错误可能是机器重启的时候,配置文件中.NETFRAMEWORK3.0部分的控制运行配置并没有加进去,所以造成配置文件出错,这时只需要添加配置就可以了

把它加载configSections之间就可以了

<sectionGroup name="system.serviceModel" type="System.ServiceModel.Configuration.ServiceModelSectionGroup, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="behaviors" type="System.ServiceModel.Configuration.BehaviorsSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<section name="bindings" type="System.ServiceModel.Configuration.BindingsSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<section name="client" type="System.ServiceModel.Configuration.ClientSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<section name="comContracts" type="System.ServiceModel.Configuration.ComContractsSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<section name="commonBehaviors" type="System.ServiceModel.Configuration.CommonBehaviorsSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowDefinition="MachineOnly" allowExeDefinition="MachineOnly"/>
<section name="diagnostics" type="System.ServiceModel.Configuration.DiagnosticSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<section name="extensions" type="System.ServiceModel.Configuration.ExtensionsSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<section name="machineSettings" type="System.ServiceModel.Configuration.MachineSettingsSection, SMDiagnostics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowDefinition="MachineOnly" allowExeDefinition="MachineOnly"/>
<section name="serviceHostingEnvironment" type="System.ServiceModel.Configuration.ServiceHostingEnvironmentSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<section name="services" type="System.ServiceModel.Configuration.ServicesSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</sectionGroup>
<sectionGroup name="system.serviceModel.activation" type="System.ServiceModel.Activation.Configuration.ServiceModelActivationSectionGroup, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="diagnostics" type="System.ServiceModel.Activation.Configuration.DiagnosticSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<section name="net.pipe" type="System.ServiceModel.Activation.Configuration.NetPipeSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<section name="net.tcp" type="System.ServiceModel.Activation.Configuration.NetTcpSection, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</sectionGroup>

以上是关于无法识别的配置节 system.serviceModel 解决方案的主要内容,如果未能解决你的问题,请参考以下文章

winform程序在其中一台电脑上报 无法识别的配置节 的错,求教。。。。

无法识别的配置部分 system.servicemodel/domainServices

自定义配置集合 - 无法识别的元素“addService”

绑定 .NET Core 无法识别的配置属性

无法识别的配置参数“默认表访问方式”谷歌云

Redshift ODBC 连接 - 无法识别的配置参数