gpt4 book ai didi

azure - 连续或计划的 Web 作业未在 Azure 应用服务中提供预期输出

转载 作者:行者123 更新时间:2023-12-03 03:23:23 24 4
gpt4 key购买 nike

创建了一个用于打印 .NET 6.0 中的数字的控制台应用程序:

namespace PrintingNumbers
{
internal class Program
{
static void Main(string[] args)
{
for (int i = 0; i <= 5; i++)
{
Console.WriteLine("Printing Number = " +i);

}
}
}

在本地构建并运行。

在Azure App Service(F1免费计划)中,上传了上述控制台应用程序的.exe文件。尝试连续,每 2 分钟安排一次。

enter image description here enter image description here

在 Application Insights 选项卡中看不到任何失败

应用服务 > 配置 > 应用洞察已配置:

enter image description here

谁能帮我看看 Web Jobs 失败的原因..!

最佳答案

最初,我的 Web 作业也失败了,无法打印数字。

enter image description here

您上传控制台应用程序的方式似乎不正确。

首先,我们需要压缩 bin\Debug\net6.0 文件夹中的所有文件。

enter image description here

  • 我通过上传上面显示的 zip 文件夹创建了另一个作业。
  • 现在我可以毫无问题地运行作业并打印数字。

enter image description here

关于azure - 连续或计划的 Web 作业未在 Azure 应用服务中提供预期输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76268456/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com