3

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.
GGleGrand
  • 1,565
  • 1
  • 20
  • 45
  • I got the same issue, do you have any luck? – Mohamed Badr Mar 07 '16 at 14:00
  • 1
    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 Mar 07 '16 at 20:57
  • New https://www.nuget.org/packages/Microsoft.Web.WebJobs.Publish/1.0.11 may fix the problem. Not tested yet. – GGleGrand Mar 17 '16 at 08:33
  • 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 Mar 17 '16 at 08:37

2 Answers2

0

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.

Community
  • 1
  • 1
lopezbertoni
  • 3,551
  • 3
  • 37
  • 53
  • Thanks. Yes a 401. But the credentials are valid everywhere that I see. The parent site of the WebJob is active and reachable as are to "sibling" WebJobs. In addition, the deployment was made together with these and the same profile has been used (and working) on multiple instances for months. I only get this error now in the Azure scheduler log, nowhere else. – GGleGrand Mar 01 '16 at 13:42
  • @GGleGrand if it helps, Webjobs that run on the Azure Scheduler are known to have issues. I have seen it fail when creating the schedule during deployment. The latest Webjobs SDK include the TimerTrigger Attribute, maybe migrating to that will help you out. Here's a link discussing the issue too http://stackoverflow.com/questions/34203859/view-azure-webjob-schedule-in-portal/34205488#34205488 – lopezbertoni Mar 01 '16 at 13:45
  • Thanks, I'll take a look. – GGleGrand Mar 01 '16 at 15:38
-1

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.

RolandoCC
  • 868
  • 1
  • 14
  • 19