Azure / azure-webjobs-sdk

Azure WebJobs SDK
MIT License
732 stars 356 forks source link

SQL Azure and EF 6.1.3/ADO.NET provider issue #1777

Open rreno-soltech opened 6 years ago

rreno-soltech commented 6 years ago

Following an EF-to-SQL Azure example I found online, I have been building Azure functions with a project.json configuration like this:

{ "frameworks": {
"net46": { "dependencies": { "Newtonsoft.Json": "10.0.3", "EntityFramework": "6.1.3", "System.Data.Common": "4.3.0" } } } }

I created a connection string app setting for my SQL Azure database, everything was working perfectly hitting my database with EF 6.1.3.

However, periodically, I get the following error:

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. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.

The link provided in the error message does not appear to have any information relevant to the issue I am seeing.

In some cases, I delete the app setting and explicitly put the connection string into my EF DbContext object. Sometimes, this resolves the error, and sometimes, it doesn't. It seems a bit flaky that the providers work when they want to. Right now, I can't do anything because of this, and I'm not sure what to do.

Any insight or assistance is appreciated.

mathewc commented 5 years ago

Can you please share your app name + timeframe via info here: https://github.com/Azure/azure-functions-host/wiki/Sharing-Your-Function-App-name-privately