I am trying to automate the TFC using Microsoft.TeamFoundation
library using C#.net but I am unable to connect to tfs
using C#.net code it shows error
string tfsUrl = "http://xx.xx.xx.xx:8080/tfs";
NetworkCredential netCred = new NetworkCredential("userid","password");
BasicAuthCredential basicCred = new BasicAuthCredential(netCred);
TfsClientCredentials tfsCred = new TfsClientCredentials(basicCred);
tfsCred.AllowInteractive = false;
TfsTeamProjectCollection tpc = new TfsTeamProjectCollection(new Uri(tfsUrl),tfsCred);
tpc.Authenticate();
An unhandled exception of type 'Microsoft.TeamFoundation.TeamFoundationServiceUnavailableException' occurred in Microsoft.TeamFoundation.Client.dll
Additional information: TF400324: Team Foundation services are not available from the server.
Technical information (for administrator):
TF31002: Unable to connect to this Team Foundation Server: http://xx.xx.xx.xx:8080/tfs.
Team Foundation Server Url: http://xx.xx.xx.xx:8080/tfs.
Possible reasons for failure include:
The name, port number, or protocol for the Team Foundation Server is incorrect.
The Team Foundation Server is offline.
The password has expired or is incorrect.
For further information, contact the Team Foundation Server administrator.
but when I use same tfs URL, Userid and password with web browser like chrome/IE it connects me without any issue. Please help me what I am doing wrong.