Azure WebJob不再在门户中获取Entity Framework连接字符串设置

时间:2018-03-07 18:26:35

标签: entity-framework azure connection-string azure-webjobs

我已经运行了一个Azure WebJob至少两年没有任何问题。 app.config包含以下内容......

<connectionStrings>
    <add name="UniversalModelEntities" connectionString="dummy - the actual connection string is specified in the portal but for some reason we need this element here" providerName="System.Data.EntityClient" />  
</connectionStrings>

在门户网站的应用程序设置中,我有...

enter image description here

这运行没有任何问题......直到今天早上我发现错误

  

应用程序配置文件中的连接字符串'UniversalModelEntities'不包含必需的providerName属性。“

我在Azure门户网站中发现的有关Entity Framework连接字符串的所有内容都说我应该将该下拉菜单设置为Custom

那么问题是什么?

此外,我发现即使在app.config中声明完整的连接字符串,我仍然会收到相同的错误消息,这表明问题出在门户网站的设置中。

1 个答案:

答案 0 :(得分:1)

我设法通过将连接字符串的下拉选项设置为SQLAzure来解决此问题...

enter image description here

...这显然会导致错误,然后将其更改回Custom ...

enter image description here

现在,WebJob正确地获取了连接字符串。