What happened to my ASP.NET project (Visual Studio Key Vault connected service)?

This article identifies the exact changes made to an ASP.NET project when adding the Key Vault connected service using Visual Studio.

For information on working with the connected service, see Getting Started.

Added references

Affects the project file *.NET references and packages.config (NuGet references).

Type Reference
.NET; NuGet Microsoft.Azure.KeyVault
.NET; NuGet Microsoft.Azure.KeyVault.WebKey
.NET; NuGet Microsoft.Rest.ClientRuntime
.NET; NuGet Microsoft.Rest.ClientRuntime.Azure

Added files

  • ConnectedService.json added, which records some information about the Connected Service provider, version, and a link to the documentation.

Project file changes

  • Added the Connected Services ItemGroup and ConnectedServices.json file.
  • References to the .NET assemblies described in the Added references section.

web.config or app.config changes

  • Added the following configuration entries:

           type="System.Configuration.ConfigurationBuildersSection, System.Configuration, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 
           requirePermission="false" />
             type="Microsoft.Configuration.ConfigurationBuilders.AzureKeyVaultConfigBuilder, Microsoft.Configuration.ConfigurationBuilders.Azure, Version=, Culture=neutral" 
             vaultUri="https://vaultname.vault.azure.net" />

Changes on Azure

  • Created a resource group (or used an existing one).
  • Created a Key Vault in the specified resource group.