Sie Tw
Sie Tw

Reputation: 133

Web Config Error in ASP.NET

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.

Upvotes: 0

Views: 1520

Answers (2)

steave
steave

Reputation: 213

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>

Upvotes: 0

Rahul
Rahul

Reputation: 77866

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>

Upvotes: 1

Related Questions