Some time ago, I used Visual Studio (2015) to create a WebApp, a console app and link that console app as OnDemand WebJob to the WebApp. I published the whole to Azure and the website, the WebJob and the Scheduler Job worked perfectly.
Last week, I noticed that the WebJob no longer runs. The website is under constant development, so I am not sure whether this is due to a change in code we applied or due to something in Azure.
Whatever I try (including completely removing the job, the schedule and the folders in App_Data on the webapp), when I publish the WebApp from VS, the webjob is recreated, but the scheduler fails with the error below.
Http Action - Response from host 'mysite.scm.azurewebsites.net': 'Unauthorized' Response Headers: Date: Fri, 29 Jan 2016 07:02:01 GMT
Server: Microsoft-IIS/8.0
WWW-Authenticate: Basic realm="site"
Body: 401 - Unauthorized: Access is denied due to invalid credentials. Server Error
Any clue what might cause this problem or which additional info I can collect to trace down the actual problem?
Thanks, Erik
We made a tweak to the WebJobs publishing NuGet and released an update to it. This update resolves the scheduler auth header issue. Once you update the publishing NuGet to be the 1.0.11 version this issue will be resolved.
https://www.nuget.org/packages/Microsoft.Web.WebJobs.Publish/1.0.11
This means that your http request to mysite.scm.azurewebsites.net (where your webjob is waiting) doesn't have the right creds on the request.
Go to your portal.azure.com and then open your scheduled web job within the scheduler collection. In the action tile, do you see if it's using any authentication? If it isn't select Basic authentication. Here you'll need to put in the user name and pw of your web app. You can get both of these values from the publish profile of the web app. Refer to this post if you don't know where it is.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With