Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6028627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:46:04+00:00 2026-05-23T04:46:04+00:00

In my application when I try to get the connection string by using this

  • 0

In my application when I try to get the connection string by using this code :

 System.Configuration.ConfigurationManager.ConnectionStrings["ConStr"].ConnectionString;

It throws an exception that “Configuration System Failed To Initialize”. Where is the format of app.config wrong ?

 <?xml version="1.0"?>
    <configuration>


      <connectionStrings>
        <add name="ConStr" connectionString="Integrated Security=false;Persist Security Info=False;User ID=funny;password=veryfunny;Initial Catalog=vegimanager;Data Source=.\sqlexpress;"/>
      </connectionStrings>



      <configSections>
        <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
          <section name="Vegi_Manager.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
        </sectionGroup>
      </configSections>




      <userSettings>
        <Vegi_Manager.Properties.Settings>
          <setting name="FIRMNAME" serializeAs="String">
            <value/>
          </setting>
          <setting name="FIRMADDRESS" serializeAs="String">
            <value/>
          </setting>
          <setting name="FIRMCITY" serializeAs="String">
            <value/>
          </setting>
          <setting name="FIRMSTATE" serializeAs="String">
            <value/>
          </setting>
          <setting name="FIRMPHONE" serializeAs="String">
            <value/>
          </setting>
          <setting name="FIRMMOBILE" serializeAs="String">
            <value/>
          </setting>
          <setting name="FIRMEMAIL" serializeAs="String">
            <value/>
          </setting>
          <setting name="FIRMTIN" serializeAs="String">
            <value/>
          </setting>
          <setting name="FIRMPAN" serializeAs="String">
            <value/>
          </setting>
          <setting name="FIRMMANDITAXNO" serializeAs="String">
            <value/>
          </setting>
          <setting name="INITIALFONFIGDONE" serializeAs="String">
            <value>False</value>
          </setting>
          <setting name="FIRMJURISDICTION" serializeAs="String">
            <value/>
          </setting>
          <setting name="FIRMBANKDETAILS" serializeAs="String">
            <value/>
          </setting>
          <setting name="FIRMDETAILS" serializeAs="String">
            <value/>
          </setting>
          <setting name="BILLFORMATNO" serializeAs="String">
            <value>0</value>
          </setting>
          <setting name="PRINTERNAME" serializeAs="String">
            <value/>
          </setting>
        </Vegi_Manager.Properties.Settings>
      </userSettings>



      <startup>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
      </startup>
    </configuration>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:46:05+00:00Added an answer on May 23, 2026 at 4:46 am

    Try putting the configSections as the first child element of configuration, because configSections should be the first element of configurations

    So your config file will go like this:

    <configuration>
    
      <configSections>
        <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
          <section name="Vegi_Manager.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
        </sectionGroup>
      </configSections>
    
      <connectionStrings>
        <add name="ConStr" connectionString="Integrated Security=false;Persist Security Info=False;User ID=funny;password=veryfunny;Initial Catalog=vegimanager;Data Source=.\sqlexpress;"/>
      </connectionStrings>
    
      <userSettings>
        <Vegi_Manager.Properties.Settings>
          <setting name="FIRMNAME" serializeAs="String">
            <value/>
          </setting>
          <setting name="FIRMADDRESS" serializeAs="String">
            <value/>
          </setting>
          <setting name="FIRMCITY" serializeAs="String">
            <value/>
          </setting>
          <setting name="FIRMSTATE" serializeAs="String">
            <value/>
          </setting>
          <setting name="FIRMPHONE" serializeAs="String">
            <value/>
          </setting>
          <setting name="FIRMMOBILE" serializeAs="String">
            <value/>
          </setting>
          <setting name="FIRMEMAIL" serializeAs="String">
            <value/>
          </setting>
          <setting name="FIRMTIN" serializeAs="String">
            <value/>
          </setting>
          <setting name="FIRMPAN" serializeAs="String">
            <value/>
          </setting>
          <setting name="FIRMMANDITAXNO" serializeAs="String">
            <value/>
          </setting>
          <setting name="INITIALFONFIGDONE" serializeAs="String">
            <value>False</value>
          </setting>
          <setting name="FIRMJURISDICTION" serializeAs="String">
            <value/>
          </setting>
          <setting name="FIRMBANKDETAILS" serializeAs="String">
            <value/>
          </setting>
          <setting name="FIRMDETAILS" serializeAs="String">
            <value/>
          </setting>
          <setting name="BILLFORMATNO" serializeAs="String">
            <value>0</value>
          </setting>
          <setting name="PRINTERNAME" serializeAs="String">
            <value/>
          </setting>
        </Vegi_Manager.Properties.Settings>
      </userSettings>
    
      <startup>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
      </startup>
    </configuration>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Whenever I try to install a Click Once application, I always get a 404
Today, everytime I try to open any .Net application I get: CLR error: 80004005
I am using xml.net in web application When I try load xml through an
I try to run jsf application in myeclipse using jboss web server and following
I try this with NetBeans desktop application template - increasing heapsize (to 512 MiB)
I am using one simple code to access the SQLite database from Java application
every once and a while my application throws a connection to database lost error.
When I add a Car in my application I get The ConnectionString property has
When I try to do that I get the error Changed to 64-bit applications
Im working on a small application to try out an idea that I have.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.