Vault Client API Error

This forum is now locked, since Gold Support is no longer offered.

Moderator: SourceGear

Locked
Balthazor
Posts: 81
Joined: Fri Mar 11, 2005 4:10 pm
Location: Hartford, Wisconsin

Vault Client API Error

Post by Balthazor » Thu Mar 16, 2006 11:34 am

I've got an application we use to build our code projects, and yesterday I released an update to it. Several of the guys here started getting an error when the application tries logging into the Vault server. The error occurs when I perform a client.Refresh() after logging in. The error recieved is:

System.IO.FileNotFoundException: Could not find file "C:\WINNT\Temp\SourceGearCache\Vault_1\Client\2E3B5E28-4282-4918-971D-A06FB90F1FC2\lkoskovich\_sgvault\-480104859\74249.186780".
File name: "C:\WINNT\Temp\SourceGearCache\Vault_1\Client\2E3B5E28-4282-4918-971D-A06FB90F1FC2\lkoskovich\_sgvault\-480104859\74249.186780"

Indeed, there was no "-480104859" directory in the _sgvault folder. Then, on a whim, I went ahead and deleted the entire cache folder and retried the app. That worked like a charm. So I'm curious if anyone has any idea what would've caused this. Why would it be looking for a directory that wasn't there? And why would deleting the cache folder make it work?

Since it works now, there's no more problem. But I'm just trying to get a better understanding of things so that I can avoid these issues in the future. Thanks.

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Thu Mar 16, 2006 3:11 pm

The _sgvault folder stores the baseline files, so that any changes can be sent as deltas between client and server. Sometimes the cache file gets out of sync. Deleting the cache causes a new baseline to be retrieved.
Linda Bauer
SourceGear
Technical Support Manager

Balthazor
Posts: 81
Joined: Fri Mar 11, 2005 4:10 pm
Location: Hartford, Wisconsin

Post by Balthazor » Tue May 23, 2006 12:07 pm

I found the cause of my problem here. When I'm setting the properties of the Vault client object, I'm setting:

client.WorkingFolderOptions.StoreDataInWorkingFolders = False;

The user who consistently gets the error I mentioned above has their Vault "Store Working Folder State/Baseline Files" setting set to In Working Folders. It gets an IO error trying to read the attributes of a baseline file. That file does actually exist, but in a different location. It exists in the working folder location, but the client object is looking for it in the Client Cache Folder location. Presumably, the Vault client creates the baseline file in the working folder, based on the user's Vault settings, but the client object in my application is looking for it in the cache folder based on my setting the StoreDataInWorkingFolders flag to False. When I remove that from my code, the problem is solved.

Interestingly, I've also found that deleting the CacheMember_WorkingFolderAssignments file makes the error go away, though only temporarily of course.

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Tue May 23, 2006 2:34 pm

Great - thanks for posting the results. Hopefully it will help if someone else runs into this.

Locked