应用服务计划中 Azure 功能的设置 "WEBSITE_CONTENTSHARE" 和 "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING" 问题
Settings "WEBSITE_CONTENTSHARE" and "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING" issues with Azure functions on an App Service Plan
我目前正在尝试为某些 Azure 功能获取正确的配置。这些功能 运行 属于应用服务计划。
根据此 document 如果我 运行 是应用服务计划中的 Azure 函数,那么我 不需要 需要进行以下设置:
- WEBSITE_CONTENTAZUREFILECONNECTIONSTRING
- WEBSITE_CONTENTSHARE
但是我发现删除设置会导致应用启动时没有可用功能,并显示以下消息:
"No job functions found. Try making your job classes and methods public.
If you're using binding extensions (e.g. ServiceBus, Timers, etc.) make
sure you've called the registration method for the extension(s) in your
startup code (e.g. config.UseServiceBus(), config.UseTimers(), etc.)."
当我重新添加设置时,该功能继续工作,但我想了解如果我使用的是应用服务计划,为什么需要这些设置。
您应该升级到最新的 Microsoft.NET.Sdk.Functions
(截至今天的 1.0.26)和 Microsoft.Azure.WebJobs.Service.Bus
(如果 运行 在完整框架上,则为 2.1.0-beta4)。
另外,根据您的描述,我不知道您是如何部署该功能的。这里有一个类似的 issue that deploying Azure Function app's via Terraform
and get the same problem with you.It seems that it is a Function app consumption plan bug.
我目前正在尝试为某些 Azure 功能获取正确的配置。这些功能 运行 属于应用服务计划。
根据此 document 如果我 运行 是应用服务计划中的 Azure 函数,那么我 不需要 需要进行以下设置:
- WEBSITE_CONTENTAZUREFILECONNECTIONSTRING
- WEBSITE_CONTENTSHARE
但是我发现删除设置会导致应用启动时没有可用功能,并显示以下消息:
"No job functions found. Try making your job classes and methods public.
If you're using binding extensions (e.g. ServiceBus, Timers, etc.) make
sure you've called the registration method for the extension(s) in your
startup code (e.g. config.UseServiceBus(), config.UseTimers(), etc.)."
当我重新添加设置时,该功能继续工作,但我想了解如果我使用的是应用服务计划,为什么需要这些设置。
您应该升级到最新的 Microsoft.NET.Sdk.Functions
(截至今天的 1.0.26)和 Microsoft.Azure.WebJobs.Service.Bus
(如果 运行 在完整框架上,则为 2.1.0-beta4)。
另外,根据您的描述,我不知道您是如何部署该功能的。这里有一个类似的 issue that deploying Azure Function app's via Terraform
and get the same problem with you.It seems that it is a Function app consumption plan bug.