0

I have a web form that is hosted on my own PC's localost (IIS-Express).I am working with .NET 4.6.

In my web.config I have

<sectionGroup>
    <section>
      <applicationSettings>
        <UI.Properties.Settings>
          <setting name=" UI_Portal" serializeAs="String">
            <value>http://localhost/Service/EppPortal.asmx</value>
          </setting>
          <setting name="UI_Portal" serializeAs="String">
            <value>http://localhost/Service/Portal.asmx</value>
          </setting>
        </UI.Properties.Settings>
      </applicationSettings>
      </section>
</sectionGroup>

And I get the error:

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

**

Config Source:
  305: 
  306:   <sectionGroup>
  307:

**

I can't find a way to resolve it. Please help. Thanks.

4
  • 2
    your posted config code doesn't match the error description. post the actual code Commented Aug 9, 2016 at 14:18
  • 1
    Is there more to your web.config? Do you use <sectionGroup> tags anywhere? Commented Aug 9, 2016 at 14:18
  • @Rahul sorry, i copied badly. plz see now. Commented Aug 9, 2016 at 14:20
  • @MADsc13nce yes there is sectionGroup, plz see. thanks. Commented Aug 9, 2016 at 14:21

2 Answers 2

1

Yes there the error you are, you are missing the <configSections> element alltogether. It should be like below. See sectionGroup Element for more information

<configSections>
<sectionGroup>
    <section>
      <applicationSettings>
        <UI.Properties.Settings>
          <setting name=" UI_Portal" serializeAs="String">
            <value>http://localhost/Service/EppPortal.asmx</value>
          </setting>
          <setting name="UI_Portal" serializeAs="String">
            <value>http://localhost/Service/Portal.asmx</value>
          </setting>
        </UI.Properties.Settings>
      </applicationSettings>
      </section>
</sectionGroup>
</configSections>
Sign up to request clarification or add additional context in comments.

3 Comments

No, I still get the error: The configuration section 'section' cannot be read because it is missing a section declaration when I do the other way around.
It shouldn't be. Can you post your web.config ... if not fully but the entire part where you define sections
I posted it -- all the section thing is there only. Even Ctrl+F says that my code has only 4 section tags.
0

I have section group defined like this in my web config, have a look, if could be of any help.

 <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">
        <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
        <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
          <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
          <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
          <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
          <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
        </sectionGroup>
      </sectionGroup>
    </sectionGroup>
  </configSections>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.