No connection string named could be found in the application config file

In the DBContext file, remove

public RaficaDB()
: base("name=DefaultConnection"){}

to

public RaficaDB()
: base("DefaultConnection"){}

EF 4.3, EF 5 and EF 6 do not like the connection string being called name=xxxxx

Answer found here -> No connection string named 'MyApplicationEntities' could be found in the application config file


You say "within my DAL, I have a webConfig". I guess the connection string is in the configuration file of a referenced class library, but not in the main configuration file you have in your entry project (a web api project, I guess looking at the tags).

If so, just copy the connection string in the entry project configuration file.