0
votes

I can get a WebJob work from azure protal.

I tried to deploy it from VS, and the result was: 401 - Unauthorized: Access is denied due to invalid credentials.

I tried set the URL like this article suggested http://blog.davidebbo.com/2015/05/scheduled-webjob.html

https://{userName}:{password}@{WebAppName}.scm.azurewebsites.net/api/triggeredwebjobs/{WebJobName}/run

..but the portal didn't let me (shows an error in the field). I tried this froma rest api tester and works!

I have to recreate the collection and the scheduler in the standard tier so I could include authorization (but not in the URL eather). Now I'm getting this error: Http Action - Request to host 'hobbule.scm.azurewebsites.net' failed: The job is missing basic auth fields.

Configuration of webjob

*MSDN question https://social.msdn.microsoft.com/Forums/azure/en-US/5d47cd51-bd60-4f00-9cba-322b020a8810/azure-scheduler-ui-problem?forum=azurescheduler

1

1 Answers

2
votes

You have to add a Basic Authorization header to the headers collection. The header value is is the Base 64 encoding of the bytes of a string comprised of your username / pwd. See this question for more info. You could also use the PowerShell commands to set up the schedule for you.