Error when using with a web service

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

Moderator: SourceGear

Post Reply
jkonline
Posts: 33
Joined: Mon Mar 23, 2009 7:03 am

Error when using with a web service

Post by jkonline » Wed Nov 03, 2010 3:00 am

I have created a web service using the vault API. This works fine on my machine however when deployed to the server it fails trying to create a folder under the default profile? Subsequent attempts give an object not set error.

I added <identity impersonate="true"/> so that the Web Service no longer used the asp.net account however that just resulted in System.Exception: Couldn't create local settings path.

I am missing something?

Thanks

John

jkonline
Posts: 33
Joined: Mon Mar 23, 2009 7:03 am

Re: Error when using with a web service

Post by jkonline » Wed Nov 03, 2010 3:41 am

Turns out that any access to vault creates a cache under the current users profile which I did not realise. The web service runs under IIS so runs under ASP.NET account which does not have a profile so uses the default one however as the account has limited access to the OS it errors creating the folder.

I can configure it to identity impersonate (this is the change to the web.config) however this will use the windows user passed via windows authentication. I assume it will have the same issue and try an use the default profile.

I will try to specify the web service to impersonate an account that does have a profile.

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

Re: Error when using with a web service

Post by lbauer » Fri Nov 05, 2010 3:17 pm

You can set the cache location to a specific location with the 2nd argument to ClientInstance.Init().
Linda Bauer
SourceGear
Technical Support Manager

Post Reply