Hi, I keep getting this error:
Microsoft.Practices.Composite.Modularity.ModuleInitializeException was unhandled
Message=An exception occurred while initializing module 'DiagrammerModule'.
- The exception message was: An exception has occurred while trying to add a view to region 'MainRegion'.
- The most likely causing exception was was: 'System.ArgumentException: The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.
at System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString)
at System.Data.EntityClient.EntityConnection..ctor(String connectionString)
at System.Data.Objects.ObjectContext.CreateEntityConnection(String connectionString)
at System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName)
....
The connection string is stored in app.config and looks like this:
<connectionStrings>
<add name="DBEntities" connectionString="metadata=res://DataAccessLayer/EntityDataModel.csdl|res://*/EntityDataModel.ssdl|res://*/EntityDataModel.msl;provider=System.Data.SqlServerCe.3.5;provider connection string="Data Source=|DataDirectory|\DB.sdf;Password=password;Persist Security Info=True"" providerName="System.Data.EntityClient" />
</connectionStrings>
where DataAccessLayer is the name of the DLL that holds the model and the entities.
What is wrong with that code?
Thanks for help.