【问题标题】:How to upload SignalRConnectionString stored in local.settings.json in VS to Azure functions on azure portal如何将存储在 VS 中 local.settings.json 中的 SignalRConnectionString 上传到 Azure 门户上的 Azure 函数
【发布时间】:2019-11-14 19:37:36
【问题描述】:

我能够将 Azure Functions 以运行 SignalR 消息传递到 Azure 门户,但未上传包含运行 SignalR 消息传递所需的 SignalRConnectionStringlocal.settings.json 文件。如何在 Azure 门户上添加此字符串?

Azure 门户上的错误消息:

Microsoft.Azure.WebJobs.Extensions.SignalRService:必须通过“AzureSignalRConnectionString”应用设置、“AzureSignalRConnectionString”环境变量或直接在代码中通过 SignalROptions.ConnectionString 或 SignalRAttribute.ConnectionStringSetting 设置 SignalR 服务连接字符串.

【问题讨论】:

    标签: azure asp.net-core signalr


    【解决方案1】:

    包含运行 SignalR 消息传递所需的 SignalRConnectionString 的 local.settings.json 文件未上传。如何在 Azure 门户上添加此字符串?

    请检查您在发布项目时是否将您在 local.settings.json 中定义的所有 Function app settings 添加到 Azure 中的函数应用。

    如果您没有为 Remote 字段添加 AzureSignalRConnectionString,您可以在 Azure 门户上选择并导航到您的函数应用,然后您可以更新 AzureSignalRConnectionString 的值或添加在 Platform features 刀片下的 Configuration 中为您的函数应用程序设置新的应用程序设置,如下所示。

    应用程序设置

    测试结果

    【讨论】:

      猜你喜欢
      • 2022-11-12
      • 1970-01-01
      • 2017-02-22
      • 2020-09-04
      • 2020-04-03
      • 1970-01-01
      • 2021-12-19
      • 2020-02-08
      • 2017-09-06
      相关资源
      最近更新 更多