4

Main Issue:

"No route registered for '/api/continuouswebjobs/WebJobName/run'" or /stop or /start but that is what is offered on the Azure portal under the webhook copy to clip board button if you are under a webjob menu under your webjob app container.

Additionally if I try: /api/site/wwwroot/app_data/jobs/continuous/WebJobName/run it gives the same error.

So in short: How do I force a register of the route?

Secondary Issue: BTW: Not sure if you are aware but "Publish as Azure Webjob" in VS2015 AND VS2017 doesnt work anymore. I have to zip up the bin directory and push a manual zip upload from the App Service Container for my WebJob. Very time consuming!

HALP! Any 411 would be much appreciated.

Thanks, -Vandy

casperOne
  • 70,959
  • 17
  • 175
  • 239

3 Answers3

3

"No route registered for '/api/continuouswebjobs/WebJobName/run'"

It seems that you'd like to manage Azure WebJobs programmatically using WebJobs API, please make sure your request method is POST when you start/stop a continuous job.

start a continuous job

enter image description here

No route registered for '/api/continuouswebjobs/{job name}/start'

enter image description here

"Publish as Azure Webjob" in VS2015 AND VS2017 doesnt work anymore.

I'm using VS2015 with Azure SDK 2.9, I can publish project as Azure Webjob fine on my side, you can try to repair or reinstall Visual Studio and upgrade your Azure SDK.

Fei Han
  • 21,907
  • 1
  • 16
  • 28
  • For your second question, if repair or reinstall Visual Studio and upgrade Azure SDK does not help solve the issue, you had better to create a new thread to explain the **Publish as Azure Webjob** issue in details. – Fei Han Aug 10 '17 at 09:02
2

I have faced similar issue in the past using VS 2017 (Community Edition) & today while going through this post, just replicated above scenario & able to make '/start' - Webhook API method to work but you have mentioned '/start' also fail. Can you try below URL update in scheduler & confirm.

In Azure Web Portal, In Azure-> Web Jobs--> Properties --> If 'Web Hooks' URL is copied, it will be having '/run' but when we try to POST to '/run', will get 'No route Registered Error' in HTTP Trace Log, since there is no corresponding POST Method updated in TimerJob or Default API Methods.

enter image description here

But, When your Web Job is enabled(Continuous or Triggered) & in SCheduler (Azure Portal --> Scheduler-->'Custom Job Name'-->Action Settings (Https, POST, Webhooks URL as '/start' instead of '/run' copied from Webjob Properties has worked for me.

enter image description here

By Default, Web Hooks API '/start' is assigned to Default Console Jobs entry Methods(Say - main() in case of C# Console Apps).

PFB Scheduler Completed Azure Log - History' post URL update:

enter image description here

Hope this might help someone!

NOTE: WebHooks API Flow will helps us to understand more.

  • 1
    that's because "/run" is for triggered webjobs, while "/start" and "/stop" for continuous. Sadly the portal always shows the /run webhook even if it is a continuous webjob – Ole Albers Jul 04 '19 at 08:28
0

I've received the same error in the Azure Portal.

As a work-around navigating to the WebJob using the Server Explorer in Visual Studio (2015), right clicking on the job and selecting run, it ran as expected with all logs working correctly.

BusyBee
  • 128
  • 1
  • 6