Forum Discussion

Rod_Falanga_DOH's avatar
Rod_Falanga_DOH
Brass Contributor
Mar 21, 2024
Solved

Can Azure Key Vault be used by older .NET Frameworks?

I have begun experimenting with Azure Key Vault to gain experience at securely saving secrets. I've got a Console app I wrote using .NET 8, to read an Azure Key Vault, which for me was thrilling.

 

However, I am wondering if using the Azure Key Vault, at least for Microsoft technologies, is restricted to .NET Core maybe going back to .NET Core 3.1 and above? I ask this because where I work, we have a LOT of applications all written using .NET Framework 4.5.2 and older. (Even down to .NET Framework 2.) None of the libraries I used would work with those older .NET Frameworks. Is there a way to make those older .NET Frameworks also work with Azure Key Vault?

  • Yes, Azure Key Vault can indeed be used with older .NET Frameworks but there are some limitations you may need to know:

     

    • .NET Framework Compatibility: The Azure Key Vault client libraries are compatible with .NET Framework 4.6.1 and above. This means that if you are using .NET Framework 4.5.2 or older, you will need to upgrade your applications to at least .NET Framework 4.6.1 to use the Azure Key Vault client libraries.
    • Using REST API: If upgrading your applications is not feasible, you can use the Azure Key Vault REST API. The REST API is independent of the .NET Framework version and can be used with any version of .NET Framework, including older versions like 4.5.2 and 2.0. You can make HTTP requests to the Azure Key Vault REST API to retrieve secrets, keys, and certificates.
    • NuGet Packages: For .NET Framework 4.6.1 and above, you can use the Azure.Security.KeyVault.Secrets NuGet package, which targets .NET Standard 2.0 and is compatible with both .NET Framework and .NET Core.
  • Yes, Azure Key Vault can indeed be used with older .NET Frameworks but there are some limitations you may need to know:

     

    • .NET Framework Compatibility: The Azure Key Vault client libraries are compatible with .NET Framework 4.6.1 and above. This means that if you are using .NET Framework 4.5.2 or older, you will need to upgrade your applications to at least .NET Framework 4.6.1 to use the Azure Key Vault client libraries.
    • Using REST API: If upgrading your applications is not feasible, you can use the Azure Key Vault REST API. The REST API is independent of the .NET Framework version and can be used with any version of .NET Framework, including older versions like 4.5.2 and 2.0. You can make HTTP requests to the Azure Key Vault REST API to retrieve secrets, keys, and certificates.
    • NuGet Packages: For .NET Framework 4.6.1 and above, you can use the Azure.Security.KeyVault.Secrets NuGet package, which targets .NET Standard 2.0 and is compatible with both .NET Framework and .NET Core.

Resources