How does a WebJob work in Azure?

Augusto Navarro 20 Reputation points
2023-08-24T13:39:21.38+00:00

I need to understand how to configure a WebJob, I registered a new one, with an .exe file, which I generated from a .Net project. the file has the function of consulting an api and sending emails. When the webjob is executed, it shows me the following error:

[08/24/2023 13:30:00 > 80300b: SYS INFO] Status changed to Initializing

[08/24/2023 13:30:00 > 80300b: SYS INFO] Run script 'MwHealthCheck.exe' with script host - 'WindowsScriptHost'

[08/24/2023 13:30:00 > 80300b: SYS INFO] Status changed to Running

[08/24/2023 13:30:04 > 80300b: ERR ] The application to execute does not exist: 'C:\local\Temp\jobs\triggered\MvHealthCheck\silaw3hz.few\MwHealthCheck.dll'.

[08/24/2023 13:30:04 > 80300b: SYS INFO] Status changed to Failed

[08/24/2023 13:30:04 > 80300b: SYS ERR ] Job failed due to exit code -2147450726

I don't know where to find the directory

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,968 questions
0 comments No comments
{count} votes

Accepted answer
  1. TP 125.8K Reputation points Volunteer Moderator
    2023-08-24T14:17:27.3833333+00:00

    Hi Augusto,

    Looking at the error you received it seems one of the files for your application is missing. Did you publish your WebJob using Visual Studio? The publish step will upload necessary files to Azure.

    Recommend you walk through article below:

    Develop and deploy WebJobs using Visual Studio

    https://learn.microsoft.com/en-us/azure/app-service/webjobs-dotnet-deploy-vs

    Please click Accept Answer if the above was useful.

    Thanks.

    -TP


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.