Issue description:

If you have configured TFS 2010 in domain environment A along with SSL configuration and trying to run your tests in MTM from a different domain B,

 You may get the error below:

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

 Solution:

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

     2. 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:

     <?xml version="1.0" encoding="utf-8"?>

   <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

    <soap:Body>

    <soap:Fault>

      <soap:Code>

        <soap:Value>soap:Sender</soap:Value>

        <soap:Subcode>

          <soap:Value>WebException</soap:Value>

        </soap:Subcode>

      </soap:Code>

      <soap:Reason>

        <soap:Text xml:lang="en">The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.</soap:Text>

      </soap:Reason>

      <detail xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ExceptionMessage="The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel." BaseExceptionName="System.Net.WebException" />

    </soap:Fault>

  </soap:Body>

</soap:Envelope>

I, 2840, 1, 2012/04/10, 13:20:01.932, PLI-T500_CB\mtm.exe, MTR : Perf : Create manual test run: 1149ms

E, 2840, 1, 2012/04/10, 13:20:01.934, PLI-T500_CB\mtm.exe, The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

 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.

 Please check the Server URL setting on TFS admin console, it should be something like: https\\abc.xyz.com\tfs

  1. Try to access the web access "https:\\abc.xyz.com\tfs\web from the server and client both.
  2. If the https:\\abc.xyz.com\tfs\web is not accessible from server and while running it from client, throws the error as mentioned in the error above, then it can be an issue with the client certificate not installed on server.
  3. To run test in MTM when TFS is configured on SSL, you need to have client certificate installed on the server. Reason is:

  In TFS 2010, when a user attempts to run a test from MTM, the server makes an outbound web service call to itself aka server-to-server call using the ‘Server Url’ as base address. So in this case, both server and client are in     the same machine and the missing certificate led to the issue. The server-to-server call happens only when we attempt test run, hence all other MTM operations will continue to work.

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