mechanicum
mechanicum

Reputation: 709

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.

My app pool is v2.0 Integrated and the Wcf service was built with 3.5. Below web.config gets

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

Upvotes: 5

Views: 15418

Answers (1)

ArunPratap
ArunPratap

Reputation: 5020

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

Upvotes: 3

Related Questions