Library.ConnectionManager.LogIn Issue

Library.ConnectionManager.LogIn Issue

ThomasRambach
Advisor Advisor
995 Views
3 Replies
Message 1 of 4

Library.ConnectionManager.LogIn Issue

ThomasRambach
Advisor
Advisor

I'm not sure why this code doesn't work:

string VaultServerName = "VaultServer"
string VaultDatabase = "VaultDatabase"

LogInResult logInResult = Library.ConnectionManager.LogIn(VaultServerName, VaultDatabase, "Administrator","Password", AuthenticationFlags.Standard, null);

But this code does:

LogInResult logInResult = Library.ConnectionManager.LogIn("VaultServer", "VaultDatabase", "Administrator","Password", AuthenticationFlags.Standard, null);

Error:

{"The type initializer for 'Autodesk.Connectivity.WebServicesTools.WebServiceManager' threw an exception."}

 

Doesn't make sense why that line doesn't except anything but the entry manually included?

0 Likes
996 Views
3 Replies
Replies (3)
Message 2 of 4

sajith_subramanian
Autodesk Support
Autodesk Support

Hi @ThomasRambach,

 

I could not reproduce the error that you have mentioned. The below code seems to work well for me:

 

string VaultServerName = "localhost";
string VaultDatabase = "TestVault";

LogInResult logInResult = VDF.Vault.Library.ConnectionManager.LogIn(VaultServerName, VaultDatabase, "Administrator", "", AuthenticationFlags.Standard, null);
           

Regards,

 

Sajith


Sajith Subramanian
Autodesk Developer Network
0 Likes
Message 3 of 4

Anonymous
Not applicable

I'm getting the same error when I try to call this method from a .NET Core 2.1 Entity Framework project and Vault 2017 dlls.

 

Is this an issue related to missing references?

0 Likes
Message 4 of 4

sajith_subramanian
Autodesk Support
Autodesk Support

Can you check out the solution in the below link:

https://forums.autodesk.com/t5/vault-customization/error-while-trying-to-login-to-vault-through-api/...

Let me know if it works for you.

 

Regards,

Sajith


Sajith Subramanian
Autodesk Developer Network
0 Likes