RiddleMeThis
RiddleMeThis

Reputation: 851

Site does not show when deployed to azure app service

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:

Framework version dropdown in Visual Studio 2019

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: Deployment success screen

Therefore, I expect to see my "Hello World!" site: Hello World site

However, it still shows default site: Default Azure App 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.

Upvotes: 1

Views: 8959

Answers (4)

Andrei Kniazev
Andrei Kniazev

Reputation: 309

I had the same problem when I did it using the bicep.

So here is my solution - https://github.com/worldpwn/azure-linux-web-app-minimal-example

It is dotnet 7 deployment to azure web app linux.

Upvotes: 0

sofia
sofia

Reputation: 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

Upvotes: 0

Victor Stagurov
Victor Stagurov

Reputation: 4756

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.

enter image description here

Upvotes: 0

Peter Schneider
Peter Schneider

Reputation: 2939

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.

enter image description here

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.

Upvotes: 7

Related Questions