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
- 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:
You may see error in the MTM log as below:
<?xml version="1.0" encoding="utf-8"?>
<soap:Text xml:lang="en">The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.</soap:Text>
<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" />
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
- Try to access the web access "https:\\abc.xyz.com\tfs\web from the server and client both.
- 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.
- 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