Azure appservice adding webjob failing

2.1k Views Asked by At

Every time i am trying to add a webjob under app service i am getting failure message. Previously it was working, from last 2 weeks i am not able to create a webjob.

enter image description here

Tried adding webjobs 50+ times

When i am trying to add manually through kudu its uploaded but under webjobs nothing created.

Error message Failed to add "Webjob name".

trying to create webjobs in azure portal>appservice>webjob>create new

Zip contains .exe, .pdb, .dll files

3

There are 3 best solutions below

6
Cindy Pau On

I suppose this problem occurs because you don't have a specific file that webjob need.

I create a .net core console app, after publish it, I zipped the folder and want to upload it as a webjob.

enter image description here

enter image description here

failed, as yours.

enter image description here

The solution is add a .cmd file in the folder and zip it with other files.

run.cmd:

@echo off

dotnet ConsoleApp1.dll

Now, these are the whole content that will inside the zip:

enter image description here

zip these files and upload.

enter image description here

Finally, works.

enter image description here

I hope this solution can help you. Please let me know if your problem is different from this.

0
Artem Beziazychnyi On

In my case, the problem was in publish profile. You need to configure your publish artifact according to the App Service configuration.

Publish configuration

App Service Configurations

0
tonymayoral On

In my case, the executable file (exe, bat, cmd, etc.) needed to be in the root of the zip for it to work.