Azure 部署 [错误]进程 'appcmd.exe' 退出,代码为 '4312'

标签 azure iis deployment azure-devops azure-web-app-service

我正在尝试在 azure vm 上进行部署,但日志中出现以下错误。任何帮助将不胜感激。

2019-02-25T14:02:55.2630391Z ##[section]Starting: Manage IISWebsite 2019-02-25T14:02:55.2638264Z ============================================================================== 2019-02-25T14:02:55.2638352Z Task : IIS Web App Manage 2019-02-25T14:02:55.2638426Z Description : Create or update a Website, Web App, Virtual Directories, and Application Pool 2019-02-25T14:02:55.2638480Z Version : 0.5.9 2019-02-25T14:02:55.2638542Z Author : Microsoft Corporation 2019-02-25T14:02:55.2638599Z Help : More Information 2019-02-25T14:02:55.2638661Z ============================================================================== 2019-02-25T14:02:56.5249594Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" list apppool /name:"azure2" 2019-02-25T14:02:56.5894950Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" set apppool /apppool.name:"azure2" -managedRuntimeVersion:v4.0 -managedPipelineMode:Integrated -processModel.identityType:ApplicationPoolIdentity 2019-02-25T14:02:56.6765646Z APPPOOL object "azure2" changed 2019-02-25T14:02:56.6880351Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" list site /name:"azure2.desap.net" 2019-02-25T14:02:56.7391199Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" add site /name:"azure2.desap.net" /physicalPath:"C:\inetpub\wwwroot\net.desap.azure2" 2019-02-25T14:02:56.8221558Z SITE object "azure2.desap.net" added 2019-02-25T14:02:56.8254882Z APP object "azure2.desap.net/" added 2019-02-25T14:02:56.8255141Z VDIR object "azure2.desap.net/" added 2019-02-25T14:02:56.8450318Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" set site /site.name:"azure2.desap.net" -applicationDefaults.applicationPool:"azure2" -[path='/'].[path='/'].physicalPath:"C:\inetpub\wwwroot\net.desap.azure2" -[path='/'].[path='/'].userName: -[path='/'].[path='/'].password: 2019-02-25T14:02:56.9132304Z SITE object "azure2.desap.net" changed 2019-02-25T14:02:56.9421865Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" list sites 2019-02-25T14:02:57.0211736Z ##[command]"netsh" http show sslcert hostnameport=azure2.desap.net:443 2019-02-25T14:02:57.0749939Z ##[command]"netsh" http add sslcert hostnameport=azure2.desap.net:443 certhash=*** appid={27113a38-e64f-45dd-8078-c551f0cd842e} certstorename=MY 2019-02-25T14:02:57.1144820Z 2019-02-25T14:02:57.1145068Z SSL Certificate successfully added 2019-02-25T14:02:57.1145124Z 2019-02-25T14:02:57.1319852Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" set site /site.name:"azure2.desap.net" /bindings.[protocol='https',bindingInformation='*:443:azure2.desap.net'].sslFlags:"1" 2019-02-25T14:02:57.1773238Z ERROR ( message:Cannot find requested collection element. ) 2019-02-25T14:02:57.3415435Z ##[error]Process 'appcmd.exe' exited with code '4312'. 2019-02-25T14:02:57.3731371Z ##[section]Finishing: Manage IISWebsite

最佳答案

出现此错误消息的原因是没有生成任何工件,我在 .yaml 代码末尾添加了这一行,并且已修复。

- task: PublishBuildArtifacts@1    
  displayName: 'Publish Artifact: drop'
  inputs:
    PathtoPublish: '$(build.artifactstagingdirectory)'

关于Azure 部署 [错误]进程 'appcmd.exe' 退出,代码为 '4312',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54868189/

相关文章:

c++ - 将应用程序部署为静态或动态构建的最佳实践是什么?

azure - az acr 登录时出现主题名称和颁发者身份验证错误

Azure ARM 模板部署

c# - Azure Function 崩溃并出现异常 ""

iis - 如何让 IIS 压缩 .svg 文件?

asp.net - IIS URL 重写与 URL 路由

python - 在 Azure 上发布 Flask Web 应用程序

asp.net - 在 Windows Server 2012 的 Azure 启动任务中安装功能

eclipse - 如何使用 Apache Tomcat 服务器运行 Eclipse 动态 Web 应用程序?

java - 如何通过运行应用程序在 Tomcat 上部署 Web 应用程序