My client has Azure subscription and has App Service inside. My Azure account is added to this App Service as owner. Now I need to add WebJob to this App Service. I have added WebJob project to Visual Studio solution, linked with Website project and try to publish (under my azure account). WebJob is deployed, but schedule can't be configured, I get an error:
Error : An error occurred while creating the WebJob schedule: Response
status code does not indicate success: 403 (Forbidden).
How to fix it?
Scheduled WebJobs use Azure Scheduler behind the scene to trigger the webjob. So, I think you need to have the rights to create an Azure scheduler too to make it working.
Another solution is to use the internal Kudu webjob scheduler, as explained in this post: http://blog.amitapple.com/post/2015/06/scheduling-azure-webjobs/
Related
I have a files in azure repro and i need to zip after that i need to
updated into azure webapp to with new webjob with
manually/continuous.
2.I have created Build Pipeline and Release Pipeline. WebJobs are not created in the azure webapp
Kindly please help on this issues if any one knows.
The processes you have taken are just publishing the demo.zip file to the default production slot in your Web App. It is not creating a WebJobs in the Web App.
I am afraid that you have misunderstanding on WebJobs of Web App. It is a feature of Azure App Service that enables you to run a program or script in the same instance as a web app, API app, or mobile app. There is no additional cost to use WebJobs.
To create a WebJob in your Web App, normally, you need to manually add the WebJob in the web UI of your Web App.
From Visual Studio 2019 I publish my ASP.NET Core 2.1 WebAPI to Azure.
The publish fails with this error message.
Web deployment task failed. (Web Deploy cannot modify the file 'xxxx.dll' on the destination because it is locked by an external process. In order to allow the publish operation to succeed, you may need to either restart your application to release the lock, or use the AppOffline rule handler for .Net applications on your next publish attempt. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FILE_IN_USE.)
If I manual stop in the App Service in Azure and then publish, the error does not appear.
Problem happens intermittently.
As a common practice, you can a new task on Azure Devops pipeline to stop the WebApp and restart the WebApp when deployment is done.
If you don't have downtime You can configure the Azure Web App to have multiple slots. Slots allow you to safely deploy your app and test it before making it available to your customers.
Also check Blue-Green Deployment with AppService
We have a WebJobs-enabled project that we use to deploy and schedule WebJobs. A couple of our developers are able to publish the project but I am getting an error when attempting to do so. The publish itself succeeds but I get a bunch of errors at the very end saying:
An error occurred while creating the WebJob schedule: ForbiddenError: The server failed to authenticate the request. Verify that the certificate is valid and is associated with this subscription.
I have tried to publish a WebJob on its own using the Publish as a WebJob command and it worked just fine. The publish profile that I am using validates just fine too. Why does it work for one but not for the other?
My account with Co-administrator privileges on the subscription, I could publish my WebJobs-enabled project to Azure App Service successfully (both website and webjob run fine). This thread discussed a similar issue, and we could find that account without Co-administrator privileges may cause this issue, so please make sure whether your account has Co-administrator privileges.
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
For anyone looking for the answer, I have found a couple of reasons people have observed this error:
You do not have administrator privileges on the subscription you are attempting to publish within.
You are attempting to set a frequency that is below 1 Hour on a free app service (web app).
I'm trying to deploy a scheduled webjob through CI and vNext tasks in VSO.
I followed the steps in the following tutorial to deploy a webjob along with a web app ("Enable automatic deployment with a web project"):
https://azure.microsoft.com/en-us/documentation/articles/websites-dotnet-deploy-webjobs/
I succeeded partially: the webjob gets deployed along with the web application. However, it is marked as On Demand instead of Scheduled (or whatever the proper status is). I can run the webjob manually and it runs just fine. I checked the files webjob-publish-settings.json (in the webjob) and webjobs-list.json (in the web app) and they seem to be alright, judging from the tutorial.
Am I missing anything? Thank you.
You can use the cron expression to create the webjob scheduler if your app is running in Basic or High mode. Refer to this link for details: Create a scheduled WebJob using a CRON expression
Otherwise, you need to enable continues delivery of Azure Webjobs.
More reference: Deploy your WebJobs projects with your Azure website using continuous delivery