sách gpt4 ai đã đi

azure - 从 Azure DevOps 发布到 Azure 应用服务 : "You do not have permission to view this directory or page"

In lại 作者:行者123 更新时间:2023-12-03 03:56:47 38 4
mua khóa gpt4 Nike

我看到很多关于这个问题的帖子。我想创建从 Azure DevOps 到 Azure 应用服务的管道。

在 DevOps 中,我创建了如下管道:

pool:
name: Azure Pipelines
steps:
- task: DotNetCoreCLI@2
displayName: 'dotnet restore'
inputs:
command: restore
projects: |
**/PowerBIDashboard.csproj
**/PowerBIDashboard.Tests.csproj

- task: DotNetCoreCLI@2
displayName: 'dotnet test'
inputs:
command: test

- task: DotNetCoreCLI@2
displayName: 'dotnet build'
inputs:
projects: '**/*.csproj'
arguments: '-o publish_output'

- task: ArchiveFiles@2
displayName: 'Archive Files'
inputs:
rootFolderOrFile: '$(System.DefaultWorkingDirectory)/publish_output'
includeRootFolder: false
archiveFile: '$(System.DefaultWorkingDirectory)/$(Build.BuildId).zip'

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(System.DefaultWorkingDirectory)/$(Build.BuildId).zip'
condition: succeededOrFailed()

nhập mô tả hình ảnh ở đây

hiện hữu发布中,我将工件部署到应用服务。在应用服务的 Kudu 中,我可以看到所有文件。

nhập mô tả hình ảnh ở đây

我删除了应用服务并重新部署,结果相同。然后我尝试直接从 Visual Studio 进行部署,但出现另一个错误。

nhập mô tả hình ảnh ở đây

然后,我检查 Kudu 中的日志,并在 eventlog.xml 中发现了这些错误:





0
1
0
Keywords

-1126954890
Application
RD281878C97A29



Failed to open siteversion.txt. ZipFS setup failed. Error: 0x80070003





0
1
0
Keywords

-1126954875
Application
RD281878C97A29



Failed to copy zip from remote source.



我哪里做错了?

1 Câu trả lời

DevOps 的部署很可能使用名为“从包运行”的功能,该功能从 zip 文件运行应用程序,并将 D:/home/site/wwwroot 目录置于只读模式。 DevOps 将根据应用程序类型尝试选择最佳部署方法。建议从包运行以避免文件锁定问题并确保文件正在运行。

如果您希望 DevOps 使用其他方法,您需要使用 ZipDeploy,而不使用 Run From Package 或 Msdeploy。我没有在 DevOps 中广泛使用 YAML,但我认为您会想要在输入下执行类似的操作,具体取决于您选择 zipDeploy 还是 msDeploy。

部署方法:zipDeploy/msDeploy

https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/azure-rm-web-app-deployment?view=azure-devops#prerequisites-for-the-task

Run from package reference

Dev Ops deployment type Reference

关于azure - 从 Azure DevOps 发布到 Azure 应用服务 : "You do not have permission to view this directory or page",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64295928/

38 4 0
行者123
Hồ sơ cá nhân

Tôi là một lập trình viên xuất sắc, rất giỏi!

Nhận phiếu giảm giá Didi Taxi miễn phí
Mã giảm giá Didi Taxi
Giấy chứng nhận ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com