Connecting to Vault 2021 from custom app hangs on "Validating user information"

Connecting to Vault 2021 from custom app hangs on "Validating user information"

Anonymous
Not applicable
624 Views
2 Replies
Message 1 of 3

Connecting to Vault 2021 from custom app hangs on "Validating user information"

Anonymous
Not applicable

I am using the Vault 2021 Prof. SDK connecting to a 2021 server. License manager is in the same server.

 

 

using VDF = Autodesk.DataManagement.Client.Framework;

namespace MyTest
{
	class Program
	{
		static void Main(string[] args)
		{
			var settings = new VDF.Vault.Forms.Settings.LoginSettings()
			{
				//ServerName = "192.168.1.6",
				//VaultName = "test"
			};
			var conn = VDF.Vault.Forms.Library.Login(settings);
		}
	}
}

 

Pretty straight forward code. However when the dialog pops up and I enter details and press OK, it just hangs on "Validating user information". I can cancel it, but I can't get in...

When using the client I can login, no problem. First time it asked for license. After that I can just autologin. But from my own app it's just stuck... 

I'm using .NET Framework 4.7.1 and I compile for 64-bit. 

Any advice?

0 Likes
Accepted solutions (1)
625 Views
2 Replies
Replies (2)
Message 2 of 3

donalmcnamee
Advocate
Advocate
Accepted solution

Are you connecting using Windows credentials (i.e. ActiveDirectory authentication)?

If so, your code should look something like this

 

Connection m_connection = null;
WindowsIdentity identity = WindowsIdentity.GetCurrent();
string username = identity.Name;

VDF.Vault.Results.LogInResult results = VDF.Vault.Library.ConnectionManager.LogIn("myServer", "myVault", null, null, AuthenticationFlags.WindowsAuthentication, null);

if (results.Success)
{
	m_connection = results.Connection;
}
			

If you're using standard authentication (i.e. Vault username and password) it would look something like this:

Connection m_connection = null;

VDF.Vault.Results.LogInResult results = VDF.Vault.Library.ConnectionManager.LogIn("myServer", "myVault", "myUsername", "myPassword", AuthenticationFlags.Standard, null);

if (results.Success)
{
	m_connection = results.Connection;
}

 

0 Likes
Message 3 of 3

Anonymous
Not applicable

Thank you! Bypassing the login dialog using your second login method allowed to get exceptions back with error message that I could use to progress! In this case the issue was a missing DLL. I had had other issues as well related to DLL's but in the end I got it working! Thanks!! 🙂

0 Likes