Page 1 of 1

SetActiveRepositoryID The device is not ready.

Posted: Thu May 29, 2008 7:00 pm
by tranlongphu
_ClientInstance _myClient = new ClientInstance();

_myClient.Init(VaultClientNetLib.VaultConnection.AccessLevelType.Client, LocalStoreBasePath);
_myClient.Login(Host, Username, Password);

VaultRepositoryInfo[] reps = null;

//List all the repositories on the server.
_myClient.ListRepositories(ref reps);

foreach (VaultRepositoryInfo r in reps)
{
if (String.Compare(r.RepName, repositoryName, true) == 0)
{
_myClient.SetActiveRepositoryID(r.RepID, _myClient.Connection.Username, r.UniqueRepID, true, true);
break;
}
}
}

What I try to do is login into Vault, loop through the list of repositories and set active repository when there's a match on a respository name I choose.

I passed login, get back correctly list of repositories, however, when I call SetActiveRepository , I got the error "The device is not ready"

Please help.

Phu Tran.

Posted: Fri May 30, 2008 7:57 am
by shannon
What version of the api are you using and what version is your server?

SourceGear vault Server version 3.1.9

Posted: Fri May 30, 2008 11:47 am
by tranlongphu
SourceGear vault Server version 3.1.9

Thanks.

Posted: Fri May 30, 2008 12:49 pm
by shannon
What are you setting LocalStoreBasePath to?

Posted: Fri May 30, 2008 7:09 pm
by tranlongphu
Yes, Thanks for that. I set that folder locally on my box that I could access to and it works.

However, occasionally, I would get this "Keyset does not exist". Could you tell me how to avoid it ? or What have I done wrong ?

Thanks