I am trying to deploy a simple "Hello World!" .NET Core MVC 3.1 web application to an Azure App Service using the Azure Portal Deployment Center.
I created a my application using .Net Core version 3.1. (Visual Studio 2019 only has version 3.1 in the drop down, not 3.0.)
Visual Studio 2019 create wizard dropdown:
However this is not yet supported in the Deployment Center. You can select a runtime stack 3.1 (LTS) when adding creating the App Service Plan, but when you try and create a CI/CD pipeline with the Deployment Centre, it gives an error: "source.buildConfiguration.version: Property 'source.buildConfiguration.version' has invalid/unsupported value 'LTS'"
If I downgrade my web application to a version 3.0, and create the App Service/deployment pipeline with 3.0 using the Azure Portal Deployment Centre (building from my Azure Repo), it says the deployment has been successful, but it still shows the default site, not my "Hello World!" site.
Azure Devops Services indicates that the deployment has been successful:
Therefore, I expect to see my "Hello World!" site:
However, it still shows default site:
Given that there are no error messages, I'm not sure how best to debug what has gone wrong with the deployment. Any advice would be appreciated.
I ran into the same issue today... The solution was to change the
Startup Command (dotnet "myApp.dll" instead of dotnet run "myApp.dll")
under Configuration - General Settings in the App Service.
You might also check the Log Stream in your App Service for additional errors.
I also had to adjust the CD pipline task "Deploy Azure App Service" in Azure Devops to the Same Startup command.
Change .NET version to v4.8. Azure by default set it to v3.5, even though I selected 4.8 in the AppService wizard. My website uses v4.6.1.
And also, you have to change the document order in the configuration settings - default documents, in order to work and show the project enter image description here
Related
I have a release pipeline to deploy my ASP.NET MVC web app to Azure VM. I have configured the release pipeline and everything was working fine.
But all of a sudden, it started throwing the error shown here. I am using IIS Web App deployment tool for this in Azure DevOps:
Looks like it's been reported as an issue related to a new task versions for WebAppDeployment tasks. See here, you might find a workaround that will work for you: https://github.com/microsoft/azure-pipelines-tasks/issues/17634
We have a App Service Enviroment https://learn.microsoft.com/en-us/azure/app-service/environment/intro I have set up an App in but I am struggling to either publish from my machine (I've added the URLs to my HOSTS file and I can see it in a browser) and cant see a clear way to publish it from Azure Dev Ops (my preferred option).
I'd be happy to be pointed to TFM but everything I find is out of date / not near the options I can see in Dev Ios or Visual Studio (2019 / 2019 Preview).
EDIT: Also note this is a multi project solution (various console apps, an API and a website it is the API / Website I want to publish)
EDIT 2: So "its always DNS" it was a DNS issue in trying to publish from Visual Studio
You can check these two links:
https://learn.microsoft.com/en-us/visualstudio/deployment/quickstart-deploy-to-azure?view=vs-2019
https://learn.microsoft.com/en-us/azure/app-service/deploy-continuous-deployment?tabs=github
If you use Visual Studio, see: Deploy an ASP.NET Web App in Azure App Service.
If you use Azure pipeline, this doc: Deploy an Azure Web App provides a tutorial to build web app and then deploy to an Azure Web App. Also see this video for detailed guidance: Build and deploy to an Azure Web App using VSTS (Quick Starts).
BTW, there are a few useful tools: Azure DevOps Labs, Azure DevOps Services Demo Generator, and DevOps Starter which will help you to get started with Azure DevOps services to automate software delivery and meet business needs.
I've deployed my code to an app service using Azure Devops CI release agent. Once I browse to the App service, it shows this error, stating that .net 5 isn't installed, and lists what is.
'The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found.'
This is what I have selected in the app service configuration, as it looks to be the only .Net 5 option.
Based on my test, the Azure App Service could support the .Net 5.
From the error message, it is indeed show that .net 5 hasn't been installed in the app service.
I could reproduce this issue too.
But when I select the .Net5 (Early Access) in Configuration and Save it, it will update the web app settings. Then the website could run successfully.
From your screenshot, you already selected this option. You could try to restart the App service and check if it could work.
On the other hand, you could try to create a new App Service with .Net5 (Early Access). Then you could directly use the App service with .Net 5.
Here is a ticket with the detailed introduction, you could refer to it.
I have a netcore 3.0 Web api that I've developed and tested on Windows using Visual Studio 2019.
I have deployed it to a Windows Web app on a Windows app service plan. This runs as expected.
I then created a Linux app service plan with a net core 3.0 Linux Web app on azure using "executable" and not "Docker".
Next I attempted to publish my Web app from Visual Studio 2019 to this instance. It succeeds however my web app just gives the following fault
I have tried deploying as Linux-x64 and portable. I have also tried selecting framework dependent and self contained as the deployment mode.
Some simply show the error above, the other combinations just time out.
Is there an official MS guide to do what I am attempting to do above?
If not how can I diagnose the error. Can I remote in via SSH? Are there error logs anywhere?
Can I remotely debug the instance?
If not can I build and test the Linux version using the Linux subsystem for Windows?
If you're not sure about how to deploy your application, you can create a new Devops project on Azure portal and import your source code later.
Search for Devops Project
Select .NET as application from the template click Next
Select ASP.NET Core as application framework click Next
Select Linux Web App as a Service
Pass the necessary paramters in the next step and you are done
you should be able to compare and apply the same
I pushed my .net core function application using visual studio and now setting up release pipeline. I can publish and execute the application just fine and it works great on the Azure portal. However when I see the builds for releases in azure-devOps that slot fails with the following error.
2019-06-19T23:21:33.3543380Z ##[error]Error: Deployment of msBuild generated package is not supported. Change package format or use Azure App Service Deploy task. D:\a\r1\a\_...AVFunctionCore.zip
I am not sure where I need to check in my setup to even start diagnosing the issue.
Here are the pipeline steps.
I create a new stage and then select a template of type (Azure app service deployment)
Under tasks
App type is Function App on Windows
Give the app name, resource group , give the slot and
package folder as
$(System.DefaultWorkingDirectory)/**/AVFunctionCore.zip
Everything else on this is left as default.
Azure function app deploy and release pipeline error
According to the error message:
Deployment of msBuild generated package is not supported. Change
package format or use Azure App Service Deploy task.
It seems you are not using the correct task to publish the generated package. Since the generated package is .zip, you can try the suggestion as error message said use Azure App Service Deploy task.
Azure App Service Deploy task:
Use this task in a build or release pipeline to deploy to a range of
App Services on Azure. The task works on cross-platform agents running
Windows, Linux, or Mac and uses several different underlying
deployment technologies.
The task works for ASP.NET, ASP.NET Core, PHP, Java, Python, Go, and
Node.js based web applications.
The task can be used to deploy to a range of Azure App Services such
as:
Web Apps on both Windows and Linux
Web Apps for Containers Function
Apps on both Windows and Linux
Function Apps for Containers
WebJobs
Apps configured under Azure App Service Environments
Check this blog Visual Studio 2017 Tools for Azure Functions and Continuous Integration with VSTS for some more details.
Hope this helps.
I get predefined pipeline from VS integration. So for those you have the same case:
In GUI/Classic mode Release page -> edit pipeline
Edit task in stage section (this is responsible for deploying)
Replace Azure Web App task with Azure App Service deploy
I have more than one project (web api + azure function) in my solution. For the web app I used the zip file, but for the azure function to work I needed to publish the whole folder.
Azure Function
Package or folder:
$(System.DefaultWorkingDirectory)/_Backend/drop
Web Api
Package or folder:
$(System.DefaultWorkingDirectory)/_Backend/drop/ClientAPI.zip