2016-08-09 22 views
0

Ich habe ein Webformular, das auf meinem eigenen PC localost (IIS-Express) gehostet wird. Ich arbeite mit .NET 4.6.Web Config Fehler in ASP.NET

In meinem web.config Ich habe

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

Und ich bekomme die Fehlermeldung:

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

**

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

**

Ich kann keinen Weg finden, es zu lösen. Bitte helfen Sie. Vielen Dank.

+2

Ihr geposteter Konfigurationscode stimmt nicht mit der Fehlerbeschreibung überein. poste den eigentlichen Code – Rahul

+1

Gibt es mehr zu deiner web.config? Verwenden Sie '' -Tags überall? –

+0

@Rahul sorry, ich habe schlecht kopiert. PLZ jetzt sehen. –

Antwort

1

Ja, da der Fehler Sie sind, fehlt Ihnen das <configSections> Element zusammen. Es sollte wie folgt sein. Siehe sectionGroup Element für weitere Informationen

<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> 
+0

Nein, ich bekomme immer noch den Fehler: Der Konfigurationsabschnitt 'section' kann nicht gelesen werden, weil es eine Abschnittsdeklaration fehlt, wenn ich das anders herum mache. –

+0

Es sollte nicht sein. Kannst du deine web.config posten ... wenn nicht vollständig, aber den ganzen Teil, wo du Abschnitte definierst – Rahul

+0

Ich habe es gepostet - alles Sektion Ding ist nur da. Sogar Strg + F sagt, dass mein Code nur 4 Abschnitts-Tags hat. –

0

I Abschnitt Gruppe wie diese in meinem Web-Config definiert haben, haben Sie einen Blick, wenn keine Hilfe sein könnte.

<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> 
Verwandte Themen