由于操作无效,通过命令行通过 WebDeploy 进行部署失败
我正在尝试使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过一段时间的搜索,我尝试了 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. :-)