Getting deployment failed error in Azure API App after syncing with GitHub - azure

I updated the NuGet packages locally and pushed the changes to remote GitHub repo. My remote repo is connected with Azure API App. After this update, I am getting deployment failed error. Below are the logs I found on Azure.
Does anyone know how to resolve this error?

I found the solution. Under the App service on Azure portal, there is a Console link in the menu. I went to the path D\home\site\repository and then ran nuget restore. It updated the package references and my build was back to normal again.

Related

Unable to connect to azure pipeline, but deploy still works in app service deployment center?

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).

Package deployment using ZIP Deploy failed with Azure DevOps Pipeline

I am trying to deploy an application to windows based App Service in Azure using Azure DevOps Pipeline. For the first time, I don't see any issues and deployment got successful. But the next time, it got failed. I am getting the below error.
Failed to deploy web package to App Service.
To debug further please check Kudu stack trace URL : https://$XYZ-dev:***#XYZ-dev.scm.azurewebsites.net/api/vfs/LogFiles/kudu/trace
Error: Package deployment using ZIP Deploy failed. Refer logs for more details.
When I go to the App Service in Azure Portal and from Deployment Center if I disconnect and trigger the pipeline, it get successful. But again next time it got failed.
Please anyone let us know the fix for this issue.
Thanks.

Azure devops - 302 status code when publishing universal package

i am trying to publish artifact from my local host to azure devops as universal package. I downloaded newest azure CLI (2.3.1) installed newest azure devops (0.18.0). After that i logged in using az login and also created my own personal access token and logged in with az devops login command. There were no errors so i assume that i logged in, i also did it with debug enabled and everything went fine.
After that i tried to publish my universal package into artifacts in my project but i got message
Failed to update Universal Packages tooling. Operation returned a 302
status code.
Error screen
In debug mode i've got
failed while trying to get token for tenant {tenant_id}
Later on there was also a retry with PAT but again 302 status from OPTIONS request.
I also tried to do other actions on my account using cli and everything was ok. I removed user from my team and it went smoothly.
Can i ask for help with this issue, if there is other option to publish this package it would be great.
The operation of Package publish from Azure cli need the support of artifacttool, so we combine these 2 operation together. When you run the command of az artifacts universal publish, it will firstly install/update the artifact tool to latest, so that it could make sure the publish action can be smoothly.
Now, the issue you faced is during the artifact tool updating. Not sure what happened on your side since it all work fine for me at present. I did universal package publish very successfully just now.
Work around:
Since you stuck at artifact tool updating, just avoid that. You can do package publish by using Azure devops task.
Just go pipeline, add Universal packages task and then configure it with below arguments:
Then, run this pipeline with self-agent(must). Because your are trying to publish the local files to Azure Universal package, only self-host agent can have ability to access local folder.

Azure App Service Kudu Continuous Deployment stopped working, not even showing latest commits

Two weeks ago I created 2 App Services, one is a Function App and the other is a PHP website... after having them created, I went to Deployment Center and configured this option to pull the code from an Azure GIT Repo and build & deploy the code using Kudu, everything was working as expected, whenever I made a code change and pushed it, Kudu was taking the latest commit, building and deploying the latest version...
Yesterday it stopped getting the latest commits from the Repo and by the time I tried to re-configure the setup to see if that helps it won't event display the commits anymore.
Here some screenshots showing the Web App and it's continuous deployment setup mapped to the Azure GIT Repo:
WebApp Continuous Deployment Setup
Azure Repo
Does anyone have faced this issue before? What could be potentially causing this situation? Could any quota limit be causing it?
NOTE: I have a Pay-as-you-go subscription.

How can I clean out an older deployment on my App Service in Azure?

I have a new version of my web app and after a new deployment from a new Bitbucket repo the old version is still served. I've deleted the App Service and then created it again, but still the old stuff is served. Everything I've tried results in a successful deployment of the new code, but when I browse the site, the old version is served. To get rid of the old code can I go to the console and just delete everything in site/wwwroot? Is there a git repo in Azure I can initialize?
According to your description, I assumed that you are using continuous deployment for your Azure App Service app. AFAIK, for basic web site deployment, azure would clone your Bitbucket repo to D:\home\site\repository, then restore packages or compile your project, then deploy your project to D:\home\site\wwwroot.
As David commented that you could leverage KUDU or ftp tool (e.g. FileZilla) to check your files under site\wwwroot and site\repository, and compare with your Bitbucket repo to make sure your source code has been synced into site\repository.
Also, you could try to delete site\wwwroot and site\repository via KUDU, then Disconnect and set your continuous deployment again on Azure portal to isolate this issue.

Resources