Message 1 of 5

Not applicable
02-12-2021
08:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
We would like to have Vault logic built into our business logic through an internal Web app. Testing a connection to our vault server, we get the error "The requested security protocol is not supported."
Error:
System.TypeInitializationException: 'The type initializer for 'Autodesk.DataManagement.Client.Framework.Vault.Library' threw an exception.'
Inner Exception
NotSupportedException: The requested security protocol is not supported.
Code:
public static Connection VaultConnection()
{
VDF.Vault.Results.LogInResult results = VDF.Vault.Library.ConnectionManager.LogIn("Server", "Name", "Administrator", "", AuthenticationFlags.Standard, null);
Connection connection = results.Connection;
return connection;
}
public static bool VaultConnectionStatus()
{
return VaultConnection().IsConnected;
}
public string Index()
{
return $"Vault Connection: {VaultConnectionStatus()}";
}
Using statements:
using Autodesk.DataManagement.Client.Framework.Vault.Currency.Connections;
using Autodesk.Connectivity.WebServices;
using Autodesk.Connectivity.WebServicesTools;
using VDF = Autodesk.DataManagement.Client.Framework;
References (x64):
Autodesk.DataManagement.Client.Framework.Vault.dll
Autodesk.DataManagement.Client.Framework.dll
Autodesk.Connectivity.WebServices.WCF.dll
Autodesk.Connectivity.WebServices.dll
Autodesk.Connectivity.Extensibility.Framework.dll
Environment:
IDE: Visual Studio 2019 | .Net core 5.0 | using IIS Express to test
Vault Server: Vault Basic Server 2021.1.1 Build 26.1.152.0
Solved! Go to Solution.