c# - Strange "The ConnectionString property has not been initialized." Error -


So just downloaded a source code for a new project that builds on some other developer's boxes and is working fine is. I'm getting the error:

ConnectionFreasting property has not been started.

I am able to connect to the database through SQL Server Management Studio in my web.config without the problem of the connection string.

Source code is not available for this error throwing library.

This project is an ASP.NET MVC project in Web.config with the following values ​​

   & Lt; / ConnectionStrings & gt; & Lt; AppSettings & gt; & Lt; add key = "ConnectionStringName" value = "DbConnection" /> & Lt; / AppSettings & gt;   

I have tried to add an app. Just configure bin and root of my ASP.NET website, for some reason, ignoring Lib.App.Config and Web.config, outside the source code.

  • In the stack overflow solution no

  • A developer had the same situation on the Windows 8.1 environment the next day, he went for a Windows 7 environment and the error was fixed. I am using Windows 7 supporters so I wonder if this is an issue with my .NET framework installations.

    ASP.NET MVC is targeting website version 4.0. My other most projects that are working without any problems are targeting them .NET 4.5

    < p> The source code for the class library that loads the connection string and it shows that an archive of the connection is loading:
      var archive = System.Web Configuration.WebConfigurationManager.ConnectionStrings? ? System.Configuration.ConfigurationManager.ConnectionStrings; If the ([[]] name [= 1] .name == zero) throw a new exception ("Unable to detect connection string in app.config or web.config! The default connection string name is \ 'DbConnection. \"); Db = new database (collection [1] .name);   

    In my machine.cong, there is a connection string for MySQL, which is called local MSSSLServer. This connection might have been added by string .net MySql connector installation or I may have changed myself.

    The connection string collection was loading a connection from my machine.cong, so the archive [1] did not have the desired connection string in the array position. It shows that some developers had no problems on their machines and other developers had a problem on their machine.

  • Comments

    Popular posts from this blog

    php - PDO bindParam() fatal error -

    logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

    java - Why my included JSP file won't get processed correctly? -