So, Azure has disabled adding WebJobs directly through the Portal, if source control (Git/Azure DevOps) is configured for that Web App. It gives an error message in the portal.
Now, as per this solution, WebJobs can be deployed if Virtual Application is configured and mapped to Release/Pipeline.
WebJob cannot be added from portal if deployment form source control is configured
After following the steps in that link and creating new Build/Release pipeline, I am facing following issues;
(Edited on 4-Oct-2019 12:30 PM UTC.)
Here is how my Build Pipeline looks.
WebJob fails during Build
Warning/Error messages of WebJob Failure
Complete Build Log
WebJob Build
Build Sequence
Log with Nuget restore before WebJob build
Log after specifying Package directory Path
WebJob actually builds properly in local VS. Why does it fail during build?
Related
I keep getting this error message in the Azure App service deployment center:
We were unable to connect to the Azure Pipeline that is connected to
this Web App. This could mean it has been removed from the Azure Dev
Ops Portal. If this has happened, you can disconnect this pipeline and
set up a new deployment pipeline.
The thing is, it stil says that it successfully deploys, but If you try to access swagger for example, you get an HTTP error 500, (swagger does work localy). I have tried restarting the app service, going back commits, to see if that would help, but nothing is working. All Json data has been doubel chekced so that isn't the problem either. Anyone know of a fix?
We were unable to connect to the Azure Pipeline that is connected to this Web App. This could mean it has been removed from the Azure DevOps Portal. If this has happened, you can disconnect this pipeline and set up a new deployment pipeline.
Th error says that files are missing in the current build , try with new deployment pipeline.
You might have added an archive step in the build pipeline. This causes the artifact to be zipped before publish.
In the release pipeline if you use Azure App Service Deploy task , This internally uses Zip Deploy, that will zip the files.
Remove the archive step, the double zipping will be avoided.
HTTP error 500
Make sure the XML documentation file output is in bin and not in bin\Debug or bin\Release (verify this for all build configurations).
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 an Azure DevOps release pipeline using the deploy azure app service task to deploy an application.
We would like to run a task prior to this deploy task to delete all files in the bin folder of the app service.
We do not want to delete all files on the target, just the ones in the bind folder.
I can't see any obvious task that will enable me to do this. Tasks seem to run in the context of the deployment server rather than the app service and so don't enable access to the app service file system.
What's the best way to do it?
If you are looking to avoid unwanted files then in the Azure App Service Deploy task there is an option "Remove additional files at destination" which while not explicitly deleting the bin folder content will ensure there is no residue from previous releases.
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
I am using the AzureContinuousDeployment.11.xaml template to build and deploy to a staging Deployment Slot. This is for an Azure Website. The build runs and executes successfully. However the code is not being deployed to the staging slot. I have included the Web Deploy Publish Profile in the configuration. I am not getting any errors and it said that it has completed. What am I doing wrong?
As info, I've been following this guide:
Azure Deployment Slots