Cryptographic Exception?

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

Moderator: SourceGear

Post Reply
realtytrac
Posts: 34
Joined: Wed Jun 15, 2005 2:07 pm

Cryptographic Exception?

Post by realtytrac » Wed Jul 13, 2005 9:49 am

I deployed a web application that is using the API to do work with Vault. I am hosting the web application on the same server that Vault is installed on.

Once i do that, i get this error when trying to login into vault using the webapplication:

System.Security.Cryptography.CryptographicException: Access is denied

this happens as soon as i get to this line: _myClient.Login(Host, Username, Password);


Is there anything wrong with running this application on the Vault server itself?

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Wed Jul 13, 2005 10:19 am

Most likely, the user that your app is impersonating doesn't have full control over %ALLUSERSPROFILE%\Application Data\Microsoft\Crypto\RSA\MachineKeys

Make sure that they have rights to that directory.

realtytrac
Posts: 34
Joined: Wed Jun 15, 2005 2:07 pm

Post by realtytrac » Wed Jul 13, 2005 10:43 am

i gave it that access and it fixed the crypto problem. But then i got this:

System.UnauthorizedAccessException: Access to the path "SourceGear\Vault_1\Client\1F75180C-74A6-44C4-A46B-BBE2FE4DE5C5\vdd"


I can't find that folder on this server. I found a similiar folder like this on my machine at MACHINENAME\ASPNET\Application Data\

but i don't have a folder like that on the server.

Any ideas?

thanks in advance

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Wed Jul 13, 2005 10:52 am

The user that you're impersonating doesn't have a home directory on the server machine. Make sure that you supply a known path that everyone will have access to write to in the init() method of clientinstance.

realtytrac
Posts: 34
Joined: Wed Jun 15, 2005 2:07 pm

Post by realtytrac » Wed Jul 13, 2005 11:24 am

thank you. that did it!

Post Reply