![01 01](https://lh3.googleusercontent.com/-xoN0erBOTk4/WGjNSN2D_LI/AAAAAAAAH-Y/Bcxwa7Hne-U/01_thumb%25255B2%25255D.png?imgmax=800)
The following links discussing the issue might be useful.
https://social.msdn.microsoft.com/Forums/vstudio/en-US/9e0b3c33-fe7f-4b28-bb88-005c0a1ec01a/vsts-deployment-on-this-environment-was-cancelled?forum=TFService
http://answers.flyppdevportal.com/MVC/Post/Thread/56e9ec27-d8a6-4543-8811-029e3b0340d0?category=tfservice
When checked in the _diag folder logs, this particular issue revealed it was due to untrusted certificate.
![02 02](https://lh3.googleusercontent.com/-8bJaUrStCFA/WGjNWBX-MhI/AAAAAAAAH-g/RBu_9nDNGGM/02_thumb%25255B3%25255D.png?imgmax=800)
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.
08:08:58.214252 at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
08:08:58.214252 at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
08:08:58.214252 --- End of inner exception stack trace ---
08:08:58.214252 at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
08:08:58.214252 at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
08:08:58.214252 --- End of inner exception stack trace ---
The TFS instance had a SSL configured with a privately generated certificate. To fix the issue had to add the certificate to the Trusted Root Certificates of the agent machine. This enabled the agent to work with the TFS.
![03 03](https://lh3.googleusercontent.com/-1YyUcwxNY2c/WGjNZRpTLII/AAAAAAAAH-o/B0AzC0hDlpc/03_thumb%25255B3%25255D.png?imgmax=800)
No comments:
Post a Comment