c# - 已正确部署 Azure 中的所有文件,但仍无法看到网页
问题描述
我正在尝试在 Azure 中部署 Asp .Net5 webapp。我已经创建了管道并成功部署了它们。但是当我尝试访问我的网站时遇到的问题,它正在显示
您的应用服务已启动并正在运行。是时候采取下一步行动并部署您的代码了。
我已经部署了我的代码。所以它不可能是部署问题。我的猜测是它一定是一些运行时问题,但问题是如何在没有任何错误或其他东西的情况下进行调试。
我的 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
请帮我。任何形式的帮助将不胜感激。
编辑:
解决方案
根据您分享的步骤,我找不到部署应用程序的任务。您的管道仅生成工件但不部署到 azure。请添加部署步骤,
您可以在这里找到相同的内容 - https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/azure-rm-web-app-deployment?view=azure-devops
推荐阅读
- python - 高级 Pandas 链接:groupby 之后的链 index.droplevel
- docker-compose - docker-compose - 重新启动单个服务的问题
- c++ - 沿类层次结构的私有继承,为什么整个层次结构都需要朋友
- google-chrome-devtools - 交互时间与第一个 CPU 空闲时间
- android - 使 RxJava 主题或变体表现得像 AAC LiveData
- r - 数据框列中出现频率最高的
- python-3.x - 从栈(Frame)对象中获取函数对象
- go - Go 通道和延迟
- c# - 如何修复仅在 android 中发生的 SQL 异常?
- html - 查找将文本 FOO 替换为样式“标题 1”