SetActiveRepositoryID The device is not ready.

Post your questions regarding using the Vault and Fortress API in your programs.

Moderator: SourceGear

Post Reply
tranlongphu
Posts: 9
Joined: Thu May 29, 2008 6:53 pm

SetActiveRepositoryID The device is not ready.

Post by tranlongphu » Thu May 29, 2008 7:00 pm

_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.

shannon

Post by shannon » Fri May 30, 2008 7:57 am

What version of the api are you using and what version is your server?

tranlongphu
Posts: 9
Joined: Thu May 29, 2008 6:53 pm

SourceGear vault Server version 3.1.9

Post by tranlongphu » Fri May 30, 2008 11:47 am

SourceGear vault Server version 3.1.9

Thanks.

shannon

Post by shannon » Fri May 30, 2008 12:49 pm

What are you setting LocalStoreBasePath to?

tranlongphu
Posts: 9
Joined: Thu May 29, 2008 6:53 pm

Post by tranlongphu » Fri May 30, 2008 7:09 pm

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
Attachments
KeysetNotExists.jpg
KeysetNotExists.jpg (22.21 KiB) Viewed 7800 times

Post Reply