Creating Repository

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
EXODUS

Creating Repository

Post by EXODUS » Wed Oct 13, 2004 10:49 pm

Using the API for C# .Net

Could not find the command to Create New Repository or to Delete current Respository.

Would any assist me with step for Creating Repository, and Deleting.

EXODUS

Post by EXODUS » Wed Oct 13, 2004 10:59 pm

oh Never Mind. I work it out already.

It would be nice if it was in the help file that it comes with.

I know the API is not supported.

Cheers

EXODUS

Post by EXODUS » Thu Oct 14, 2004 6:25 pm

//HostName, UserName, Password are define to match my Vault URL Services


ClientInstance LClient = new ClientInstance();
LClient.Init(VaultClientNetLib.VaultConnection.AccessLevelType.Client);
LClient.Login(HostName, UserName, Password);
LClient.Connection.AddRepository("New Repository", true);
LClient.Logout();

it throw an error "Object reference not set to an instance of an object"

it fall over when it try to do LClient.Connection.AddRepository("New Repository", true);


can you assist me with this problem I having
thanks.

sterwill
Posts: 256
Joined: Thu Nov 06, 2003 10:01 am
Location: SourceGear

Post by sterwill » Fri Oct 15, 2004 9:29 am

You'll need to change your access level parameter to Init() to be VaultClientNetLib.VaultConnection.AccessLevelType.Admin, so the administrative set of web services on the server is available to the client instance.

Also, be sure to supply a user in the admin group when you perform the login.
Shaw Terwilliger
SourceGear LLC
`echo sterwill5sourcegear6com | tr 56 @.`

EXODUS

Post by EXODUS » Sun Oct 17, 2004 8:27 pm

Thanks for the tips.

Everything is working fine now. :D

Post Reply