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

问题描述 投票:0回答:1

创建了一个用于在 .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 应用服务(F1 免费计划)中,上传上述控制台应用程序的 .exe 文件。 尝试连续,每 2 分钟安排一次。

在 Application Insights 选项卡中看不到任何故障

App Service > Configuration > App Insights Configured:

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

azure azure-webjobs azure-appservice
1个回答
0
投票

最初连我的网络作业都失败了,无法打印数字。

enter image description here

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

首先,我们需要压缩

bin\Debug\net6.0
文件夹中的所有文件。

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

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.