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.
Note:
I see many posts about fixing the development machine but my problem is not that. My problem lies when I upload the code to the Windows 2012 server.
Question:
How do you ensure that the SERVER gets the proper settings when uploading a EF6 solution?
I already updated the server to DotNet 4.5.1, what else should I install on the server?
=======================================
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 !!!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With