3
votes

I have scheduled a (single, free) WebJob. This has been working fine form months. I just updated to the newest Azure WebJobs Nuget, which may be circumstantial.

What I now get in the Azure WebJob scheduler logs is the following although I deployed everything without errors from Visual Studio 2015. My other, non scheduled webjobs that I deployed to the same server at the same time work fine. Who can tell me where I need to look/change?

Http Action - Response from host 'dummy4711(account).scm.azurewebsites.net': 'Unauthorized' Response Headers: Date: Mon, 29 Feb 2016 23:32:03 GMT
 Server: Microsoft-IIS/8.0
 WWW-Authenticate: Basic realm="site"
 Body: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <title>401 - Unauthorized: Access is denied due to invalid credentials.
2
I got the same issue, do you have any luck? - Mohamed Badr
As a stop-gap before we migrate to the new trigger-cron approach, we just delete the azure scheduler jobs by hand before we re-deploy the scheduled WebJobs. This is a nuisance, but works fine for the moment. - GGleGrand
New nuget.org/packages/Microsoft.Web.WebJobs.Publish/1.0.11 may fix the problem. Not tested yet. - GGleGrand
In my case I was publishing to staging site, so deleting the deployment slot and creating a new one and publishing to it fixed my issue, I really what was the reason but this worked for me - Mohamed Badr

2 Answers

0
votes

Can you check your connection string? That's what the error is telling you.

Access is denied due to invalid credentials

Maybe you wiped them or change them before deploying.

EDIT

Here's a link to an example to set this up.

-1
votes

Had the same problem yesterday with a new job deployment, something went broke either with the new portal or Web Jobs SDK Update I just installed in VS 2015...

The cause was as small as hard to notice.

How did I solve it? New portal, go to Scheduler Jobs > {job name} > Settings > Action Settings

Be sure to have action set to HTTPS and the URL should start with HTTPS://...

I don't know why my VS2015 SP1 was setting up the scheduler job with https but action was set to http, this cause the HTTP 401 error.

Cheers.