Monday, April 09, 2012

Entity Framework Code First Error-- The path is not valid. Check the directory for the database.


You may get the the path is not valid error if you are using SQL Server CE 4.0 and do not have the ASP.Net data folder (APP_Data).

Connection String

Make sure you create the APP_Data folder





Digg It! Add to del.icio.us Stumble This

Entity Framework Code First Error -- The provider did not return a ProviderManifestToken string

There are a couple of reasons for getting this error when using Code First approach in Entity Framework 

Reason 1: The name of the connection string does not match the name of the Entity Framework Context.
Example: The name of my EF context JobBoardContext does not match the name of the connection string which is JobBoard.





Reason 2: Entity Framework was unable to make a connection to the database. Take a look at the inner exception to get more details about the exception.

Check the inner details of the exception to know more details about the connection error















Digg It! Add to del.icio.us Stumble This