简体   繁体   English

无法读取配置节'configsections',因为它缺少节声明

[英]The configuration section 'configsections' cannot be read because it is missing a section declaration

I want to host a Wcf service on an IIS 10.0 on Windows Server 2016. 我想在Windows Server 2016上的IIS 10.0上托管Wcf服务。

My app pool is v2.0 Integrated and the Wcf service was built with 3.5. 我的应用程序池是v2.0集成的, Wcf service是用3.5.构建的3.5. Below web.config gets web.config下面获取

The configuration section 'configsections' cannot be read because it is missing a section declaration. 

Service runs fine with same config on a w8.1 - IIS6.2 and on older Windows Server versions . w8.1-IIS6.2older Windows Server versions上,服务运行正常,配置相同。 What could be missing? 可能会遗漏什么?

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configsections>
     <sectiongroup name="system.web.extensions" type="system.web.configuration.systemwebextensionssectiongroup, system.web.extensions, version=3.5.0.0, culture=neutral, publickeytoken=31bf3856ad364e35">
       <sectiongroup name="scripting" type="system.web.configuration.scriptingsectiongroup, system.web.extensions, version=3.5.0.0, culture=neutral, publickeytoken=31bf3856ad364e35">
       </sectiongroup>
    </sectiongroup>
</configsections>

You should do like this 你应该这样做

 <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <configSections>
         <sectiongroup name="system.web.extensions" type="system.web.configuration.systemwebextensionssectiongroup, system.web.extensions, version=3.5.0.0, culture=neutral, publickeytoken=31bf3856ad364e35">
           <sectiongroup name="scripting" type="system.web.configuration.scriptingsectiongroup, system.web.extensions, version=3.5.0.0, culture=neutral, publickeytoken=31bf3856ad364e35">
           </sectiongroup>
        </sectiongroup>
    </configSections>

here is the full Article 这是完整的文章

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法读取配置节&#39;entityFramework&#39;,因为它缺少节声明 - The configuration section 'entityFramework' cannot be read because it is missing a section declaration 配置部分&#39;services&#39;无法读取,因为它缺少部分声明 - the configuration section 'services' cannot be read because it is missing a section declaration 无法读取配置节'customErrors',因为它缺少节声明 - The configuration section 'customErrors' cannot be read because it is missing a section declaration 无法读取配置节&#39;connectionStrings&#39;,因为它缺少节声明 - The configuration section 'connectionStrings' cannot be read because it is missing a section declaration 无法读取配置节“ serviceAutoStartProviders”,因为它缺少节声明 - The configuration section 'serviceAutoStartProviders' cannot be read because it is missing a section declaration 无法读取配置节&#39;程序集&#39;,因为它缺少节声明 - The configuration section 'assemblies' cannot be read because it is missing a section declaration 无法读取配置节&#39;system.web.webPages.razor&#39;,因为它缺少节声明 - The configuration section 'system.web.webPages.razor' cannot be read because it is missing a section declaration 无法读取配置节“ system.ServiceModel”,缺少节声明 - The configuration section 'system.ServiceModel' cannot be read, missing section declaration 配置部分&#39;log4net&#39;缺少部分声明 - Configuration section 'log4net' is missing a section declaration Web作业中的Log4net:无法识别的配置部分log4net-但我的configSections在顶部 - Log4net in web job: unrecognized configuration section log4net - but I have configSections in top
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM