Search code examples
sslvisual-studio-2013msbuildwebdeploy

How can resolve Untrusted certificates Error ?( TFS2013 Build and deploy to IIS )


I crate a build definition on tfs2013.when I queue my builddefinition I get an error about Untrusted certificates.

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets (4270): Web deployment task failed. (Connected to the remote computer ("developertest") using the specified process ("Web Management Service"), but could not verify the server’s certificate. If you trust the server, connect again and allow untrusted certificates. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CERTIFICATE_VALIDATION_FAILED.

I check help link and it has 3 way to resolve it

  • From the msdeploy.exe command line, you can do this by passing the -allowUntrusted flag.
  • From the Visual Studio 2010 publish UI, you can check "Allow untrusted"

  • From a Visual Studio 2010 deployment package (e.g. MyApp.deploy.cmd), you can pass the -allowUntrusted flag

For first and third way I dont know how do it In second way I cant find Allow untrusted in vs2013 publish dialog


Solution

  • I add /p:AllowUntrustedCertificate=true to MsBuild arguments.and it's resolved