A Vault client stores some local objects (e.g. Shortcuts) in path with next structure: "C:\Users\user\AppData\Roaming\Autodesk\VaultCommon\Servers\<Services_Security_version>\<ServerName>\Vaults\<VaultName>\Objects\Shortcuts.xml".
For the Vault 2020 the <Services_Security_version> == "Services_Security_1_7_2019",
for Vault 2019 => "Services_Security_1_16_2018".
QUESTION: Is there any way to get the <Services_Security_version> (version or name of folder) through Vault API ?
Solved! Go to Solution.
Solved by smilinger. Go to Solution.
Solved by smilinger. Go to Solution.
You can do it like this:
var url = vaultConnection.WebServiceManager.DocumentService.Url;
//var url = "http://server/AutodeskDM/Services/v24/DocumentService.svc";
WebRequest request = WebRequest.Create($"{url}?wsdl");
request.Proxy = null;
var xmlDoc = new System.Xml.XmlDocument();
using (WebResponse response = request.GetResponse())
using (Stream stream = response.GetResponseStream())
xmlDoc.Load(stream);
string tns = xmlDoc.DocumentElement.Attributes["targetNamespace"].Value;
var tnsParts = tns.Split('/', StringSplitOptions.RemoveEmptyEntries);
var dateParts = tnsParts.Skip(tnsParts.Length - 3);
var serverNamespace = $"Services_Security_{string.Join('_', dateParts)}";
Forget my former post, you should use this:
VDF.Vault.Library.LocalFileLocation.GetVaultCommonConnectionPath(
conn: connection,
serverSpecific: true,
serverVersionSpecific: VDF.Vault.Currency.Connections.CommonPreferenceVersionRequirements.VersionSpecific,
vaultSpecific: true
);
Can't find what you're looking for? Ask the community or share your knowledge.