I am currently trying to connect to a VSTS project using the code below, I have previously connected successfully after entering credentials into the dialog box shown.
if (!IsConnected)
{
sourceControl = release.SourceControl;
connection = new VssConnection(new Uri(sourceControl), new VssClientCredentials());
workItemTrackingHttpClient = connection.GetClient<WorkItemTrackingHttpClient>();
}
The dialog box is no longer shown and an exception is thrown:
TF400813: Resource not available for anonymous access. Client authentication required.
I am unaware of any changes that could have caused this to break, any help would be greatly appreciated.
You can delete the cached credential from registry:
Computer\HKEY_CURRENT_USER\Software\Microsoft\VSCommon\14.0\ClientServices\TokenStorage\VisualStudio
(delete VssApp key)You also can specify the credential storage: