2
我試圖用TeamCity和WebDeploy自動化部署過程。 Click-One-Publish離開IDE工作正常,但是從我的ANT腳本調用,由於請求無效而失敗。通過命令行通過WebDeploy部署失敗,由於無效操作
這裏我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框架可能被打破,所以我重新安裝該框架,但這是不幸的解決方案。
一些細節到服務器環境:
- 的Microsoft Windows Server 2008
- IIS7
- 的.NET Framework V3.5(默認)
- 的.NET Framework v4.0.30319
- 通過ActiveDirectory進行身份驗證