Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public bool TryToConnect(string userName, string password, string tfsUrl)
- {
- var tpc = new TfsTeamProjectCollection(
- new Uri(tfsUrl),
- new NetworkCredential(userName, password, "pccin"));
- try
- {
- tpc.EnsureAuthenticated();
- }
- catch (Exception)
- {
- return false;
- }
- return true;
- }
- 2016-02-12T13:20:35 PID[25440] Verbose Error accessing the registry to get the display name: System.IO.IOException: The specified registry key does not exist.
- at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
- at Microsoft.Win32.RegistryKey.CreateSubKeyInternal(String subkey, RegistryKeyPermissionCheck permissionCheck, Object registrySecurityObj, RegistryOptions registryOptions)
- at Microsoft.Win32.RegistryKey.CreateSubKey(String subkey, RegistryKeyPermissionCheck permissionCheck)
- at Microsoft.Win32.RegistryKey.CreateSubKey(String subkey)
- at Microsoft.TeamFoundation.Common.Internal.TeamFoundationEnvironment.**OpenOrCreateRootUserRegistryKey()**
- at Microsoft.TeamFoundation.Client.RegisteredTfsConnections.OpenCurrentUser(String key, Boolean writable, Boolean shouldCreate)
- at Microsoft.TeamFoundation.Client.RegisteredTfsConnections.GetInstancesInfos(Boolean includeDeleted)
- at Microsoft.TeamFoundation.Client.RegisteredTfsConnections.GetCollectionsInternal(Boolean returnOnlyLegacyServers)
- at Microsoft.TeamFoundation.Client.RegisteredTfsConnections.GetProjectCollection(Uri uri)
- at Microsoft.TeamFoundation.Client.TfsTeamProjectCollection.get_Name()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement