首页 > 解决方案 > 已正确部署 Azure 中的所有文件,但仍无法看到网页

问题描述

我正在尝试在 Azure 中部署 Asp .Net5 webapp。我已经创建了管道并成功部署了它们。但是当我尝试访问我的网站时遇到的问题,它正在显示

您的应用服务已启动并正在运行。是时候采取下一步行动并部署您的代码了。

我已经部署了我的代码。所以它不可能是部署问题。我的猜测是它一定是一些运行时问题,但问题是如何在没有任何错误或其他东西的情况下进行调试。

我可以在 Kudu 控制台中看到我的文件。 在这里我们可以看到文件

dev.azure.com中的管道和发布也显示正确。 在此处输入图像描述

我的 yml 文件

# ASP.NET Core (.NET Framework)
# Build and test ASP.NET Core projects targeting the full .NET Framework.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core

trigger:
  batch: true
  branches:
    include:
    - master

pool:
  vmImage: 'windows-latest'

variables:
  solution: '**/*.sln'
  buildPlatform: 'Any CPU'
  buildConfiguration: 'Release'

steps:
- checkout: self
  submodules: true

- task: NuGetToolInstaller@1

- task: NuGetCommand@2
  inputs:
    restoreSolution: '$(solution)'

- task: VSBuild@1
  inputs:
    solution: '$(solution)'
    msbuildArgs: '/p:DeployOnBuild=true /p:EnvironmentName=$(EnvironmentName) /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(build.artifactStagingDirectory)\WebApp.zip" /p:DeployIisAppPath="Default Web Site"'
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

- task: VSTest@2
  inputs:
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

- task: PublishBuildArtifacts@1
  inputs:
    pathToPublish: $(Build.ArtifactStagingDirectory)
    artifactName: MFLBuildOutput

请帮我。任何形式的帮助将不胜感激。

编辑

对于部署,我已经创建了一个发布管道,如下所示 - 在此处输入图像描述

标签: c#asp.netazuredeploymentazure-devops

解决方案


根据您分享的步骤,我找不到部署应用程序的任务。您的管道仅生成工件但不部署到 azure。请添加部署步骤,

在此处输入图像描述

您可以在这里找到相同的内容 - https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/azure-rm-web-app-deployment?view=azure-devops


推荐阅读