none
Trying to use TFS Build and deploy to IIS

    Question

  • I am totally new to this.  I can successfully create a build using our build server which deploys the files to the application server.  What I am now trying to do is publish these files into IIS.  This is the command that is running :-

    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe
    /nologo /noconsolelogger "C:\Builds\11\Beef Specs\Manual Deployment to
    OranTestBeef\Sources\BeefSpecs.sln" /m:1 /fl /flp:"logfile=C:\Builds\11\Beef
    Specs\Manual Deployment to
    OranTestBeef\Sources\BeefSpecs.log;encoding=Unicode;verbosity=normal"
    /p:SkipInvalidConfigurations=true /p:DeployOnBuild=True
    /p:DeployTarget=MsDeployPublish /p:CreatePackageOnPublish=True
    /p:MSDeployPublishMethod=WMSVC /p:MSDeployServiceUrl=orantestbeef
    /p:DeployIisAppPath="Default Web Site/BeefSpec" /p:UserName=[myusername]
    /p:Password=******* /p:OutDir="C:\Builds\11\Beef Specs\Manual Deployment to
    OranTestBeef\Binaries\\" /p:VCBuildOverride="C:\Builds\11\Beef Specs\Manual
    Deployment to OranTestBeef\Sources\BeefSpecs.sln.vsprops"
    /dl:WorkflowCentralLogger,"c:\Program Files\Microsoft Team Foundation Server
    2010\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Normal;BuildUri=vstfs:///Build/Build/36;InformationNodeId=2577;TargetsNotLogged=GetNativeManifest,GetCopyToOutputDirectoryItems,GetTargetPath;TFSUrl=http://oranprodtfs:8080/tfs/Software%20Support%20-%20.NET;"*WorkflowForwardingLogger,"c:\Program
    Files\Microsoft Team Foundation Server
    2010\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Normal;"

    This is the error I get

    C:\Program Files
    (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets
    (3847): Web deployment task failed.(Connected to the destination computer
    ("orantestbeef") using the specified process ("The Web Management Service"), but
    could not verify the server’s certificate. If you trust the server, connect
    again and allow untrusted certificates.) Connected to the destination computer
    ("orantestbeef") using the specified process ("The Web Management Service"), but
    could not verify the server’s certificate. If you trust the server, connect
    again and allow untrusted certificates. The underlying connection was closed:
    Could not establish trust relationship for the SSL/TLS secure channel. The
    remote certificate is invalid according to the validation procedure.

    Wednesday, March 21, 2012 9:22 AM

Answers

  • Hi Tumeke,

    Thanks for your post.

    The “orantestbeef” is a remote server? 

    According the troubleshoot in this article: http://webdeploywiki.com/Print.aspx?Page=Common%20Web%20Deploy%20problems%20and%20how%20to%20troubleshoot%20them. Diagnosis: The certificate presented by the Web Deploy endpoint is untrusted or invalid. This typically happens if the remote server has a self-signed certificate for the Remote Agent Service or the Web Management Service. Resolution: Either install a trusted certificate on the endpoint, or try bypassing certificate validation. 1) From the msdeploy.exe command line, you can do this by passing the -allowUntrusted flag. 2) From the Visual Studio 2010 publish UI, you can check "Allow untrusted" 3) From a Visual Studio 2010 deployment package (e.g. MyApp.deploy.cmd), you can pass the -allowUntrusted flag.

    Please verify the username and password are correctly, and verify that user has the required permissions to deploy site to IIS on the “orantestbeef” computer.  

    To deploy using Team Build, we should ensure the flowing steps:

            1        Execute MSBuild command(with that username and password) to deploy your site manually, ensure can be deployed correctly.

            2        Deploy your site using VS 2010 with that username and password, ensure can be deployed correctly.

    For more information about deployment using Team Build 2010, please refer to this article: http://vishaljoshi.blogspot.com/2010/11/team-build-web-deployment-web-deploy-vs.html.    


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us



    Thursday, March 22, 2012 2:07 AM