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
Solved! Go to Solution.
Solved by smithmat. Go to Solution.
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