When the Open-VaultConnection commandlet is used in a powershell session or in a development environemnt like ISE it returns an 404 error. This is only the case when attempting to connect to an older Vault version. The error message may look like this(Error message translated from german):
The remote server returned an error (404) Not found. ---> System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at "http://SERVERNAME/AutodeskDM/Services/Filestore/v23/IdentificationService.svc" that could accept the message.
There are multiple Vault clients installed on the problematic machine. When powerVault code is executed within powerJobs or Data Standard it works fine.
When used in an IDE powerVault consumes the latest Vault API on the system. But Vault clients can only connect to their respective server version or up to to versions higher. This means when the latest API version on the system is Vault 2018 (internal number v23) it would produce an error when connecting to a Vault 2017 server.
- One solution would be to remove the older Vault clients and SDKs
- Another solution would be to load the necessary API version before you use the Open-VaultConnection commandlet. If you do this you cannot use powerJobs ISE/powerVault ISE, as this would load the latest API version. Instead you have to start your development environment from its EXE file and load the commandlets manually after the API.
[System.Reflection.Assembly]::LoadFrom("C:\Program Files\Autodesk\Vault Professional 2017\Explorer\Autodesk.Connectivity.WebServices.dll") Import-Module powerVault Import-Module powerJobs