简体   繁体   中英

Deploy Azure AppService to Url: 404 + no worker is assigned to the app service plan. The site cannot serve any requests

I'm getting a 404 trying to access my azurewebsite.net

My Resource group contains an AppServicePlan, an AppService, SQL Server & SQL Database, a KeyVault & SignalR.

Locally everything works, the AppService is running, AppServicePlan is Ready (1App/0Slots), Connected Services for SignalR & SQL are configured (in the menu you get when right-clicking WebProject > Publish). KeyVault is configured & accessible. Not sure if these are problem free though, as I keep getting NuGet Errors, stating unable to update NuGet Package.

When I right-click my WebProject & Publish, I get Message Publish has been succeeded. But when I click on the link, I get a 404.

I'm working with two pipelines in AzureDevops

Seeing as official documentation is always lagging behind and showing older interfaces, it has not been much of a help. I followed https://docs.microsoft.com/en-us/learn/modules/create-release-pipeline/5-deploy-to-appservice this tutorial, did everything stated, but the last step, I didn't get the desired result (an accessible website through azurewebsites.net).

I have a Export template with all connected services configured (I guess generated by azure?) but don't really know what to do with it.

Can anybody pinpoint what I am missing or doing wrong? Or tell me what else I would be needing, apart from the services I mentioned (like Certificates, Active Directory?) Do I need a gitHub repo next to AzureDevOps Repo & Azure Resources? Does publishing via VS interfere with my automated pipelinebuilds?

Thanks!

You can try to deploy to Azure App Service in Azure DevOps directly. I used the sample you shared and worked well on my side. Here are my steps:

1.Create the App Service instance in Azure and make sure the default home page is correct.

2.Clone the sample from GitHub to Azure DevOps Repo.

3.Change the deploy stage in the azure-pipelines.yml file on release branch and run pipeline. I removed variable groups and changed the configuration of AzureWebApp task: 在此处输入图像描述

4.Browse the page in Azure. I can get the same page as in the tutorial.

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM