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:

    <appSettings>
       <add key="vaultName" value="<your Key Vault name>" />
       <add key="vaultUri" value="<the URI to your Key Vault in Azure>" />
    </appSettings>
    

Changes on Azure

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