So have just downloaded the source code for a new project that builds and runs fine on a couple other developer's boxes. I am getting the error:
The ConnectionString property has not been initialized.
I am able to connect to the database via SQL Server Management Studio using the connection string in my Web.config without issue.
The source code for the library that is throwing this error is not available.
The project is an ASP.NET MVC Project with the following values in the Web.config
<connectionStrings>
<add name="DbConnection" connectionString="Data Source=la-foo-server\development,1444;database=mydb;user id=myId;password=myPassword;" providerName="System.Data.SqlClient" />
</connectionStrings>
<appSettings>
<add key="ConnectionStringName" value="DbConnection" />
</appSettings>
I have tried adding an App.Config to the bin and root of my ASP.NET Website just in case, for some reason, the lib with out source code, is trying to read an App.Config and is ignoring the Web.config.
StackOverflow solutions that have not helped:
- How to fix "The ConnectionString property has not been initialized"
- The ConnectionString property has not been initialized error
- Solve the error "The ConnectionString property has not been initialized."?
A developer had this same situation on a Windows 8.1 environment the other day, he moved to a Windows 7 environment and the error was fixed. I am using Windows 7 pro so I wonder if it is an issue with my .NET Frameworks installations.
The ASP.NET MVC Website is targeting version 4.0. Most of my other projects that all work without issue are targeting .NET 4.5