【问题标题】:Azure WebJob no longer picking up Entity Framework connection string setting in portalAzure WebJob 不再选择门户中的实体框架连接字符串设置
【发布时间】:2018-08-15 23:13:13
【问题描述】:

我的 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>

在门户的应用程序设置我有...

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

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

我在 Azure 门户中发现的有关 Entity Framework 连接字符串的所有内容都表明我应该将该下拉列表设置为 Custom

那么问题出在哪里?

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

【问题讨论】:

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


    【解决方案1】:

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

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

    现在 WebJob 正确地拾取连接字符串。

    【讨论】:

    • 重要提示:不要忘记替换 &quote;对于'
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-09-13
    相关资源
    最近更新 更多