由于操作无效,通过命令行通过 WebDeploy 进行部署失败

发布于 2024-12-02 09:27:36 字数 1312 浏览 1 评论 0原文

我正在尝试使用 TeamCity 和 WebDeploy 自动化部署过程。从 IDE 中单击一发布工作正常,但从我的 ANT 脚本调用它由于无效请求而失败。

这是我的 ANT:

   <?xml version="1.0" encoding="WINDOWS-1250"?>
   <project default="build" basedir="." name="WebDeploy"> 
      <target name="build" description="Baut und Published die Anwendung!"> 
        <exec failonerror="true" executable="${MSBuild}MSBuild.exe"> 
          <arg line=" /t:Rebuild /p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish /p:CreatePackageOnPublish=True /p:MSDeployPublishMethod=WMSvc /p:Configuration=${configuration} /p:username=${user} /p:password=${password} /p:AllowUntrustedCertificate=True /p:MsDeployServiceUrl=${host} ${sln}"/> 
        </exec> 
      </target> 
    </project>

这里是错误(尽我所能翻译):

   error: Web deployment task failed.((30.08.2011 09:45:12) An error occurred when the request was processed on the remote computer.)       
   error: It was tried to execute an invalid operation for the file '4_0_30319'

我的第一个建议是 .NET Framework 可能会被破坏,因此我重新安装了该框架,但不幸的是这没有解决方案。

服务器环境的一些详细信息:

  • Microsoft Windows Server 2008
  • IIS7
  • .NET Framework v3.5(默认)
  • .NET Framework v4.0.30319
  • 通过 ActiveDirectory 进行身份验证

I'm trying to automate the deploy-process with TeamCity and WebDeploy. Click-One-Publish out of the IDE works fine, but called from my ANT-script it fails due to invalid request.

Here my ANT:

   <?xml version="1.0" encoding="WINDOWS-1250"?>
   <project default="build" basedir="." name="WebDeploy"> 
      <target name="build" description="Baut und Published die Anwendung!"> 
        <exec failonerror="true" executable="${MSBuild}MSBuild.exe"> 
          <arg line=" /t:Rebuild /p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish /p:CreatePackageOnPublish=True /p:MSDeployPublishMethod=WMSvc /p:Configuration=${configuration} /p:username=${user} /p:password=${password} /p:AllowUntrustedCertificate=True /p:MsDeployServiceUrl=${host} ${sln}"/> 
        </exec> 
      </target> 
    </project>

Here the error (as good as I can translated):

   error: Web deployment task failed.((30.08.2011 09:45:12) An error occurred when the request was processed on the remote computer.)       
   error: It was tried to execute an invalid operation for the file '4_0_30319'

My first suggestion was that the .NET Framework could be broken and so I reinstalled the framework, but this was unfortunately no solution.

Some details to the server-environment:

  • Microsoft Windows Server 2008
  • IIS7
  • .NET Framework v3.5 (default)
  • .NET Framework v4.0.30319
  • Authentification over ActiveDirectory

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

又爬满兰若 2024-12-09 09:27:36

经过一段时间的搜索,我尝试了 Windows 默认程序并完全删除了目标网络空间。重新创建网络空间并重新配置设置后,一切正常。我希望这一小集对其他人有所帮助。 :-)

After searching for a while I tried a Windows default procedure and deleted the target webspace completely. After recreating the webspace and reconfigure the settings everything works fine. I hope this little epsiode helps some other. :-)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文