.net - .Net Framework 4.6.1 中的 Azure Function App 突然停止工作

标签 .net azure azure-function-app

我有一个运行 .Net Framework(目标框架 4.6.1)的 Azure Function App,但现在失败。每documentation ,Function被设置为.Net Core,然后降级到v1以支持Framework。在我最初从 Visual Studio 发布该函数后,该函数可以工作,但很快就停止工作了。

当我尝试从移动应用程序调用该功能时,出现 500 错误。当我在 Azure 门户中转到应用程序内的某个功能时,出现以下错误:

The function runtime is unable to start.

我重新启动了功能应用程序,并且实际上停止然后重新启动。我尝试从 Visual Studio 重新发布代码,但失败了,并显示:

The attempt to publish the ZIP file through https://***.scm.azurewebsites.net/api/zipdeploy failed with HTTP status code InternalServerError.

Application Insights 之前一直在处理这个问题,但它不再显示任何网络请求。

有什么地方可以得到更好的诊断吗?我看到的每个错误都是模糊的。此外,在 .Net Framework 4.6.1 上运行 Azure Function 应用是否存在我需要注意的已知问题?

最佳答案

The function runtime is unable to start.

您最好观看日志流/使用应用程序见解来捕获问题所在。 (您还可以使用 Kudu 检查日志)

我不是 100% 确定,但我相信您很有可能没有使用运行时 v1:

enter image description here

Additionally, are there known issues with running Azure Function apps on .Net Framework 4.6.1 that I need to be aware of?

除了您被某些特定的依赖版本锁定之外,还有更重要的细节需要注意: https://github.com/Azure/app-service-announcements/issues/129

我一直在让 v1 与更新的依赖版本一起工作的“ hell ”。它 super 复杂而且不太稳定。如果您确实需要坚持 v1,我强烈建议您将代码迁移到 Azure 容器实例并使用 Azure Function v1 作为触发机制。

如果可能,您应该迁移到核心并使用最新的运行时版本。

关于.net - .Net Framework 4.6.1 中的 Azure Function App 突然停止工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60572713/

相关文章:

c# - 在新线程中启动表单并在它们之间引发事件

azure - 使用 DefaultAzureCredential 通过系统管理标识访问 Azure AppConfiguration

php - 如何使用新的 microsoft graph api 创建身份验证 token ?

azure - 数据流 - Azure - isDecimal

plugins - azure 媒体服务 - 如何保护我的视频 URL 不被用户下载?

azure - 使用 Azure Function App 在 Python 脚本中使用 SendGrid 发送邮件

azure - 嵌套 ARM 模板并依赖于另一个资源组

.net - 加载新的托管应用程序时,是否每次都加载和初始化CLR?

c# - WPF Datagrid "Select All"按钮 - "Unselect All"也是?

c# - 启动和停止(强制)线程作业