0

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

Cindy Pau
  • 13,085
  • 1
  • 15
  • 27
  • 1
    Much more information will be required for someone to offer a suggestion. Are you using some version of Net Framework, Net core, Python, Java, etc? Screenshots of the error message? How are you deploying? Where are you deploying to exactly? The more information you can provide, the higher the probability that someone will be able to help you. – Rob Reagan Sep 18 '19 at 13:47
  • What your file upload is ? – Cindy Pau Sep 19 '19 at 03:21
  • its a publish.zip file. basically i created a .netcore console app and after publish i just zipped the folder and trying to upload as a web job in azure portal. it was working good before but from last 2/3 weeks i am getting failure message always. – Ratikanta Parida Sep 19 '19 at 06:48
  • Hi, Can you show the content of your zip file? It will helps solve the problem. – Cindy Pau Sep 19 '19 at 08:18
  • added a screenshot of zip contains, thanks – Ratikanta Parida Sep 19 '19 at 08:55
  • What is your .net core console app name? use a cmd to run it. – Cindy Pau Sep 19 '19 at 09:38
  • use cmd to run the .dll file. If your app is .NET Core, only publish and zipped is not enough. – Cindy Pau Sep 19 '19 at 09:40
  • I will answer this question, you can have a try. – Cindy Pau Sep 19 '19 at 09:41
  • Have your problem be solved with you? what happened with that? – Cindy Pau Sep 24 '19 at 01:17

3 Answers3

0

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.

Cindy Pau
  • 13,085
  • 1
  • 15
  • 27
  • My console name is 'ConsoleApp1', I don't know the name of yours. If your problem is simmlar to mine, just use .cmd file to run the .dll file of your console app. – Cindy Pau Sep 19 '19 at 10:05
  • thanks for the solution, i will try this out.. but i have .exe inside the zip, exe does not work? – Ratikanta Parida Sep 19 '19 at 12:01
  • @RatikantaParida .exe works on my side. You can have a try of this solution. If it still doesn't work, please let me know. maybe other problem. – Cindy Pau Sep 20 '19 at 02:37
  • @RatikantaParida Can your .exe file run in your local environment – Cindy Pau Sep 20 '19 at 07:16
  • i found another way to upload webjobs through visual studio webjob project, this way we can directly publish a webjob from VS – Ratikanta Parida Sep 25 '19 at 07:18
  • @RatikantaParida Yes! you should have used this method. I was confused at that time why you posted to the profile and uploaded it to the webapp. In fact, this can be published directly through VS. I am sorry that I have not solve this problem for you. – Cindy Pau Sep 25 '19 at 07:55
0

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

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

tonymayoral
  • 4,797
  • 2
  • 26
  • 27