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: 

ConnectionManager.GetExistingConnection() is always returning null

1 REPLY 1
SOLVED
Reply
Message 1 of 2
rajeshkorada
524 Views, 1 Reply

ConnectionManager.GetExistingConnection() is always returning null

Hi experts,

              I am trying to use the following API in Vault 2014

Autodesk.DataManagement.Client.Framework.Vault.Library.ConnectionManager.GetExistingConnection() , this API is always returning NULL.

 

I have tried to login multiple time with same user id , password, server , vault and authentication data, still i get NULL

 

Has any one used this API, please  let me know if any pre-requisties need to followed before calling the API.

 

Regards

Rajs

Thanks and Regards
Rajesh Korada
1 REPLY 1
Message 2 of 2
smithmat
in reply to: rajeshkorada

Here is a sample usages of the API showing it behaving correctly:

 

var connectionManager = Autodesk.DataManagement.Client.Framework.Vault.Library.ConnectionManager;
var loginResult = connectionManager.LogIn("localhost""Vault""Administrator"""AuthenticationFlags.Standard, null /* progressCallback */);
var connection = loginResult.Connection;
 
var existingConnection = connectionManager.GetExistingConnection("localhost""Vault""Administrator"""AuthenticationFlags.Standard);
 
Console.WriteLine("Connection: {0}",  connection.Ticket);
Console.WriteLine("Existing Connection: {0}", existingConnection.Ticket);
 
connectionManager.LogOut(connection);
connectionManager.LogOut(existingConnection);

Output:

Connection: c88aead3-ffb6-4ae3-a8b9-c964ad179cab
Existing Connection: c88aead3-ffb6-4ae3-a8b9-c964ad179cab

 

In order for GetExistingConnection to return a connection, there must already exist an identical signed in connection (and it had have signed in using the ConnectionManager.

 

Hope that helps,

- Matt

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

Post to forums  

Autodesk Design & Make Report