I had this problem when I started using Entity Framework, it happened when I did not change the old SQL server connection to EntityFrameWork connection.
Solution: in the file where connection is made through web.config file "add name="Entities" connectionString=XYZ", make sure you are referring to the correct connection, in my case I had to do this
public static string MyEntityFrameworkConnection
{
get
{
return ConfigurationManager.ConnectionStrings["Entities"].ConnectionString;
}
}
call MyEntityFrameworkConnection whenever connection need to be established.
private string strConnection= Library.DataAccessLayer.DBfile.AdoSomething.MyEntityFrameworkConnection;
note: the connection in web.config file will be generated automatically when adding Entity model to the solution.