I have a WebAPI 2 using EF6 on my local machine and it works perfectly.
When I PUBLISH the solution and upload it to the server, I get the following error:
System.Data.Entity.Core.MetadataException: Schema specified is not valid. Errors:
Database.FooModel.ssdl(2,2) : error 0152: No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'. Make sure the provider is registered in the 'entityFramework' section of the application config file.
SOLUTION: Unfortunately, I had to restart a new application and quickly copy the files and that solved the problem. Now the server runs perfectly. If I look at the Published files (prior and after), I see a newer "EntityFramework.dll" file version and a new "EntityFramework.SqlServer.dll" file on the bin directory. I also noticed that "Microsoft.Data.Edm.dll and Microsoft.Data.OData.dll" are not on the new version.
Not sure this info can help ..but at least we know that we can create a new application and that works !!!