Community
Vault Customization
Share your knowledge, ask questions, and explore popular Vault API, Data Standard, and VBA topics related to programming, creating add-ins, or working with the Vault API.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to connect to Vault SDK 2025 server with .NET Framework web application deployed on IIS

3 REPLIES 3
Reply
Message 1 of 4
irene_leiTDLRT
288 Views, 3 Replies

How to connect to Vault SDK 2025 server with .NET Framework web application deployed on IIS

The Web Application importing Vault SDK 2025 deployed to IIS Server shows VaultLicenseMismatchException when connecting to WebServiceManager.

AdskLicensingSDK_8.dll, AdskIdentitySDK.dll and AdskIdentitySDK.config have been attached into the root folder of the application. The Vault 2025 SDK has been defined in System Environment Path.

LicensingAgent is applied and the whole project is work when build by visual studio.

irene_leiTDLRT_0-1731051762562.png

 

The full error message is like:

Autodesk.Connectivity.WebServices.VaultLicenseMismatchException: Exception of type 'Autodesk.Connectivity.WebServices.VaultLicenseMismatchException' was thrown.
at Autodesk.Connectivity.WebServices.LicenseManager.ValidateLicenseForEdition(IEnumerable`1 serverSupportedProducts)
at Autodesk.Connectivity.WebServicesTools.WebServiceManager.WebServiceCredentials_SignIn()
at Autodesk.Connectivity.WebServicesTools.WebServiceManager.SignIn()

 

 

3 REPLIES 3
Message 2 of 4

Do you have a Vault Client installation on this machine?


Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
Message 3 of 4

Connecting to Vault SDK 2025 Server with .NET Framework Web Application on IIS Prerequisites: Vault 2025 SDK: Ensure you have the latest Vault 2025 SDK installed on your development machine. .NET Framework Web Application: A web application project targeting a compatible .NET Framework version. IIS Server: A configured IIS server to host your web application. Steps: Add Vault SDK References: In your Visual Studio project, add references to the following Vault SDK assemblies: Autodesk.Connectivity.WebServices.dll Autodesk.Connectivity.Explorer.dll Other relevant assemblies based on your specific needs. Implement Vault Connection Logic: Create a class or method to handle the Vault connection: C# using Autodesk.Connectivity.Cloud Services ; public class VaultConnection { public static Vault.Client.IVault GetVaultClient(string vaultServerUrl, string username, string password) { var credentials = new NetworkCredential(username, password); var connection = new Connection(vaultServerUrl, credentials); var client = new Vault.Client.IVault(connection); return client; } } Use code with caution. Handle Authentication: Basic Authentication: Use the provided username and password in the GetVaultClient method. Integrated Windows Authentication: Configure your web application to use Integrated Windows Authentication and leverage the user's credentials. Other Authentication Methods: Consult the Vault SDK documentation for specific instructions on other authentication methods like token-based authentication or OAuth. Deploy to IIS: Deploy Web Application: Deploy your web application to IIS, ensuring that the necessary .NET Framework and Vault SDK assemblies are deployed along with it. Configure Application Pool: Set the application pool's .NET Framework version to match your application. Configure Security: Configure IIS security settings to allow access to the Vault server and handle authentication mechanisms. Handle Exceptions and Error Handling: Implement robust error handling to catch exceptions like connection failures, authentication errors, and Vault API errors. Log errors for troubleshooting and analysis. Additional Considerations: Licensing: Ensure that your application is properly licensed for Vault usage. Vault Server Configuration: Verify that the Vault server is configured to allow external connections and that necessary firewall rules are in place. Performance Optimization: Consider optimizing your Vault connection and API calls to improve performance, especially in high-traffic scenarios. Security Best Practices: Follow security best practices when handling sensitive information like Vault credentials. By following these steps and considering the additional factors, you can successfully connect your .NET Framework web application to a Vault 2025 server and leverage its capabilities.

Message 4 of 4
mslosar
in reply to: irene_leiTDLRT

No offense, but that looks like it was cut/paste from something and it dropped all the formatting. 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report