This project is read-only.

No entity connection strings in App.config file

Nov 21, 2011 at 2:26 PM

I am sure I am doing something stupid again.

"Exception Details: NakedObjects.Core.NakedObjectsSystem.InitialisationException: No entity connection strings in App.config file"

I let EF save the connection to the config when I added the model of the DB.

I copied the following from the model projects app.config to the MVC project's web.config.

        <add name="efms_devEntities" connectionString="..." providerName="System.Data.EntityClient" />

Redid the whole thing 3 or 4 times.

Any tips?

Nov 21, 2011 at 5:08 PM

Is it possible that you have copied the connection string into the wrong web.config file? In a standard mvc project there is one web.config within the Views folder, and one at the top project level (no, I don't know why that is).  The connection string needs to go in the top level one, which having added the NakedObjects.Mvc package, should already contain a <connectionStrings> section  -  so you need only copy the one line across.

Nov 21, 2011 at 5:20 PM
I can't believe I did that!
Yes, you are right! Thank you much.