Community
Vault Customization
Share your knowledge, ask questions, and explore popular Vault API, Data Standard, and VBA topics related to programming, creating add-ins, or working with the Vault API.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to load IExplorerUtil throw exception

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
mnav
755 Views, 4 Replies

Unable to load IExplorerUtil throw exception

Hi

I am using Vault 2012 from my client machine i want to get the working folder. i am using IExplorerUtil but its throwing  following excetion.

"Exception has been thrown by the target of an invocation."

IExplorerUtil error.JPG

 

Here is my code throwing exception on LoadExplorerUtil call.

            UserPasswordCredentials login = new UserPasswordCredentials("Vault2012", "Vault", "Administrator", "");
            WebServiceManager serviceManager = new WebServiceManager(login);
            IExplorerUtil VaultExplorer = ExplorerLoader.LoadExplorerUtil(login.ServerName,
                                                                          login.VaultName,
                                                                          serviceManager.SecurityService.SecurityHeader.UserId,
                                                                          serviceManager.SecurityService.SecurityHeader.Ticket);

            string workingFolder =  VaultExplorer.GetWorkingFolder(serviceManager.DocumentService.GetFolderRoot());

 

thanks for your help

4 REPLIES 4
Message 2 of 5
Redmond.D
in reply to: mnav

Are you using base Vault?  IExplorerUtil will not work with that product.  It only works with Vault Workgroup, Collaboration or Professional. If you are in base Vault, you can use DocumentService.DownloadFile.  That function gets the file but doesn't do the more complex features, like fixing broken references.

 

 

 



Doug Redmond
Software Engineer
Autodesk, Inc.

Message 3 of 5
mnav
in reply to: Redmond.D

Hi Doug Thanks for your reply

 

i have tried with both basic and collaboration error is same.

i want to get the path for working folder on local machine.

 

thanks.

Message 4 of 5
Redmond.D
in reply to: mnav

So you have the Vault Collaboration 2012 client installed on the computer but you are still getting the exception.

 

TargetInvocationException doesn't usually have anything useful.  Always dig deepr into the InnerException for these cases. That will tell you the real error.

 

What context is your code running in?  If you are running your own EXE try altering your project settings to match Vault Explorer's settings by using .NET 3.5 and the x86 platform target.



Doug Redmond
Software Engineer
Autodesk, Inc.

Message 5 of 5
mnav
in reply to: Redmond.D

Thanks Doug

 

Changing the .net framework from 4 to 3.5 solve the issue.

 

thanks a lot once again

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report