Issue description:

If you have configured TFS 2010 in domain environment along with SSL configuration and trying to run your tests in MTM from a workgroup environment, you may get the error below:

The underlying connection was closed: could not establish trust relationship for the SSL\TLS secure channel

 

Solution:

    TFS is configured in domain environment with SSL configuration and trying to run the test from MTM in workgroup mode, you will be able to connect to TFS from MTM by providing the credentials, however, while running the test, you will get the error mentioned in the issue description above.

       

        Enable tracing in the MTM, you can follow the below blog:

                  Refer:

                    http://blogs.msdn.com/b/gautamg/archive/2011/01/20/how-to-enable-tracing-for-mtm.aspx

       

          You may see error in the MTM log as below:

        Error creating test case results for the new run:
          Microsoft.TeamFoundation.TestManagement.Client.TestManagementServerException:
         The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Web.Services.Protocols.SoapException: The underlying connection was
      closed: Could not establish trust relationship for the SSL/TLS secure channel.

         --- End of inner
      exception stack trace ---

         at
      Microsoft.TeamFoundation.Client.TeamFoundationClientProxyBase.ProcessHttpResponse(HttpWebResponse
      response, Stream responseStream, WebException webException, XmlReader&
      xmlResponseReader)

         at
      Microsoft.TeamFoundation.Client.TeamFoundationClientProxyBase.ExecWebServiceRequest(HttpWebRequest
      request, XmlWriter requestXml, String methodName, HttpWebResponse&
      response)

         at
      Microsoft.TeamFoundation.TestManagement.Client.TestResultsService.CreateTestResults(TestCaseResult[]
      results, String projectName)

         at
      Microsoft.TeamFoundation.TestManagement.Client.TestRun.SaveNewRun(Boolean
      uploadInBackground)

      CreateWebRequest() -- Uri: https://tfsservername.com/tfs/DefaultCollection/TestManagement/v1.0/TestResults.asmx

       

      Note: you may see other errors as well related to authentication and file not found in the log files, those are not related to the current scenario.

       

        Go to the TFS server and look at the server URL setting in the TFS admin console, if it is mentioned as http://localhost/tfs, change localhost to FQDN. After that you should be able to run the test.

         

        Content developed by: Deepak Mittal
        Content reviewed by: Teodora Stanev