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

问题描述 投票:3回答:1

我想在Windows Server 2016上的IIS 10.0上托管Wcf服务。

我的应用程序池是v2.0集成和Wcf service是用3.5.建立下面web.config得到

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

服务在w8.1 - IIS6.2和older Windows Server versions上使用相同的配置运行正常。可能会遗漏什么?

<?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>
c# wcf iis
1个回答
1
投票

你应该这样做

 <?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

© www.soinside.com 2019 - 2024. All rights reserved.