Access denied to Application Data directory

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

Moderator: SourceGear

Post Reply
achiles

Access denied to Application Data directory

Post by achiles » Sun May 09, 2004 8:55 pm

I am building a web services which return directory structure in Vault. I successfully built it in my laptop, but when I installed it in my desktop, I keep getting the following errors when SetActiveRepositoryID is called:

Access to the path SourceGear\Vault_1\Client\508FC785-BDDC-4176-BE34-1E66F7500E5A\Admin" is denied.

I came to know that this might be related to TreeCache object which uses the local drive for Vault directory structure cache. I give "Everyone" full control in "Document and Settings" directory, but the problem did not go away.
The laptop and desktop have the nearly the same settings: Windows 2003 Enterprise, SQL Server 2000, Vault 1.2.2 Server. I could not simply figure out why it works in one and failes in another PC. Does anybody have any idea? I would appreciate any comments.

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Mon May 10, 2004 7:54 am

this might be a red-herring, but is it possible that the files have been set to read-only?
Jeff Clausius
SourceGear

Guest

Post by Guest » Mon May 10, 2004 1:48 pm

Thanks for the reply!!!

The odd thing is that this problem does not occur in regular exe file. Only in my web services, TreeCache.LocalStoreFilePath returns a path starting with SourceGear\Vault_1\... Regular exe file returns a full path like C:\Document and Settings\...\SourceGear\Vault_1\... I suspect that the problem occurs due to this partial file path.

Since my web services runs in the same PC where Vault server resides, I really do not need caching. Is there a way to turn caching off?

Thanks again.

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Mon May 10, 2004 3:16 pm

i'll let someone more familiar with the client address that problem.

one option... can you run your web service under its own identity w/ impersonation? this would give the web service access to an %appdata% folder.

just a thought.
Jeff Clausius
SourceGear

achiles

Post by achiles » Mon May 10, 2004 3:36 pm

I really appreciate your help. I am new to web services, and I will explorer the impersonation. This may solve the problem.

Thanks a lot.

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Mon May 10, 2004 8:22 pm

for impersonation, you simply add the name of an account configured to run as an asp.net process

i think these links should help:
Jeff Clausius
SourceGear

achiles

Post by achiles » Mon May 10, 2004 8:39 pm

Impersonation worked!!!
Thanks a lot. You are so wonderful!!!

Post Reply