3
votes

I have a web application project deployed to Azure. I have added existing project(console application) as Azure Web Job to web app project and configured the web job to run daily.

But now when I publish the web app, i am getting following error An error occurred while creating the WebJob schedule: Response status code does not indicate success: 403 (Forbidden).

Note: The Azure Web App gets published successfully if i configure the web job to run on demand instead of recurring(daily)

Can anyone point what could be the resolution of this error and publish web job successfully?

Thanks in advance

1
any details for the 403 error? - Kai Zhao
No i get this "An error occurred while creating the WebJob schedule: Response status code does not indicate success: 403 (Forbidden)." error in the Error window of visual studio. I have pay as you go subscription, would there be anything related to that? - Anna Jhaveri
Just tried your process but didn't encounter this issue, the web app was published successfully after adding console application as web job and configured recurring(daily). I find one similar issue here, it suggests change jobRecurrenceFrequency in webjob-publish-settings.json in the console application, I've checked after configuring the schedule from my side, the jobRecurrenceFrequency's value is Day, in case missing anything, I'd suggest you check it from your side. - forester123
I tried deploying from another computer but results into same error. Just want to mention that Azure Web App project is part of SharePoint provider hosted app to be deployed for Office 365, but i dont think that should be a problem. Below is the details of output window log when error occurs: 2>Publish Succeeded. 2><project location>\packages\Microsoft.Web.WebJobs.Publish.1.0.9\tools\webjobs.console.targets(110,5): Error : An error occurred while creating the WebJob schedule: Response status code does not indicate success: 403 (Forbidden). - Anna Jhaveri
I got the issue resolved, once i got co-administrator privileges on the subscription. - Anna Jhaveri

1 Answers

1
votes

For anyone looking for the answer, I have found a couple of reasons people have observed this error:

  1. You do not have administrator privileges on the subscription you are attempting to publish within.
  2. You are attempting to set a frequency that is below 1 Hour on a free app service (web app).