By Harry Singh


2018-03-13 15:56:11 8 Comments

Firstly, I searched on the StackOverflow ,also watched all the similar answers but can't find any solution.

app.conf file

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
   <configSections>
      <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
         <section name="dtaabse.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
      </sectionGroup>
  </configSections>
  <connectionstrings>
    <add name="Db" connectionstring="Data Source=(local);Initial Catalog =DV login pro; Integrated Security=true"
         providerName="System.Data.SqlClient"
/>
  </connectionstrings>

  <applicationSettings>
    <dtaabse.Properties.Settings>
      <setting name="setting" serializeAs="String">
        <value />
      </setting>
    </dtaabse.Properties.Settings>
  </applicationSettings>
</configuration>

form.cs file

string connstring = ConfigurationManager.ConnectionStrings["Db"].ConnectionString;

Only this line shows the error. Please help me to find this error!

1 comments

@Scott Hannen 2018-03-13 16:15:33

It's case sensitivity. Change connectionstring and connectionstrings to connectionString and connectionStrings.

<connectionStrings>
    <add name="Db" connectionString="Data Source=(local);Initial Catalog =DV login pro; Integrated Security=true"
     providerName="System.Data.SqlClient"
    />
 </connectionStrings>

@Harry Singh 2018-03-13 16:28:56

OMG thanks bro.....realyy a big thanks..

@Scott Hannen 2018-03-13 17:18:57

My pleasure. If that's correct, please mark it as answered. Thanks

Related Questions

Sponsored Content

0 Answered Questions

There was a conflict between "mscorlib, Version=4.0.0.0" and "mscorlib, Version=2.0.5.0"

  • 2017-05-21 09:19:51
  • Prisoner ZERO
  • 496 View
  • 4 Score
  • 0 Answer
  • Tags:   c# asp.net-core

2 Answered Questions

[SOLVED] How to mark a List or IEnumerable serializable?

  • 2017-02-07 19:56:47
  • Blaise
  • 857 View
  • 1 Score
  • 2 Answer
  • Tags:   c# asp.net-mvc

1 Answered Questions

Joining two tables entity framework

2 Answered Questions

[SOLVED] How can Type int[] implement interfaces that do not yet exist (for me)?

  • 2016-06-30 22:10:40
  • Mr Anderson
  • 98 View
  • 5 Score
  • 2 Answer
  • Tags:   c# .net

1 Answered Questions

1 Answered Questions

[SOLVED] how to map expression<func<Entity,DTO>> with automapper

1 Answered Questions

[SOLVED] Assert.Equal anonymous objects across assemblies fails

1 Answered Questions

1 Answered Questions

Sponsored Content