Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Errors while trying to connect Visual Studio to a test controller outside of the domain

My setup is as following:

Domain A: Visual Studio 20120 on my local workstation, pointing to my controller via an IP address
Workgroup (non-Domain): Visual Studio 20120 test controller in Amazon's EC2 cloud

When trying to connect my Visual Studio to the controller I received the following error "Cannot connect with controller ... The server has rejected the client credentials. The logon attempt failed"

To deal with that issue, I've created, on my workstation, a new local (non-domain) user with the same name and password as the user/password combination on the cloud.

Once I did that, I started an instance of Visual Studio as that user (using "Run as") and tried again. That gave out a different error message:

"the requested name is valid but no data of the requested type was found"

like image 786
VitalyB Avatar asked Feb 18 '23 22:02

VitalyB


2 Answers

Turns out that what Visual Studio is actually complaining about (in a very obscure way) is that it is able to connect to the controller by the IP address, but it is unable to connect to its via its hostname.

To resolve it, I had to connect to my controller computer and get its hostname. Then I went to my hosts file (C:\Windows\System32\drivers\etc) and added the hostname as well as the ip address.

With that done, Visual Studio successfully connected to the controller.

like image 96
VitalyB Avatar answered May 12 '23 11:05

VitalyB


I had a similar issue. I've notice some weird quirks when having the test controller in the domain, and the agents outside my network in workgroup computers. The controller seems to try to connect back to the agents using their netbios name, so you need to add that hostname to your hostfile with the public IP address if it isn't in your internal DNS. The agent seems to try to connect to the controller using the FQDN (active directory domain, not internet domain) of the controller, so that needs to go in the host file of the agent. You need to have the same account name and password for the agents and controller. If your controller is on a separate computer from your test manager, you need to have the controller service account be a domain account with the same username/password as the local service account on the agents. I have a complete walkthrough of what I did to make it work at http://nerdsknowbest.blogspot.com/2013/10/how-to-setup-visual-studio-tfs-test-agents-cloud.html if it helps you, or anybody else. Also, if you have anything in the hosts file that points to 127.0.0.1, comment it out.

like image 41
Greg Kjono Avatar answered May 12 '23 11:05

Greg Kjono