Reputation: 2891
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.
Upvotes: 0
Views: 2489
Reputation: 13558
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.
Upvotes: 2