c# - No connection string could be found in the config file. But it is there -
I have spent a good part of the day to decide on this. There is only one solution found in every post I get on this problem. Put the connection string in the config file for the start project.
I have two projects for an EDMX and for my website, my connection string is in both of my files, and I still get the error. I have to add all the config files Attempted to include something I have tried to put a connection string in all the configuration files in my solution, the Conflict section of the Confidential Framework for the Confidential Framework Adding or adding to the form, and using Nugs to uninstall and reinstall EF 5.
I inherited this solution, so I do not have much information about how this was made, besides this database was the first.
Connection String Error: I went there and fought with this exact issue. The solution is to add unit framework 6 to your app using NuGet . This will generate the correct connection string for you, and set up your app.config The Nugget Wizard setting up the AppConfig is quite clever: if it's first There are some bad settings, so they will remove them and add good entries. For more information, and a step-by-step guide, see my answer:.
& lt; Add name = "StoreContext" connectionString = "metadata = res: //*/Store.csdl | res: //*/Store.ssdl | res: //*/Store.msl; provider = System.Data.SqlClient; provider Connection String = & amp; quot; Data Source = *****; Initial List = *****; Integrated Security = True; MultipleActive ResetsSet = True; App = EntityFramework & amp; quot; "Provider Name =" System .Data.EntityClient "/>
'A connection string named StoreContext can not be found in the string application config file.
Comments
Post a Comment