2

How do I connect Azure Key Vault to C# windows Service application using visual studio? I am using VS 2019 and .NET Framework 4.7.2.

There is no service dependencies option under connected service where I usually find Azure Key Vault for the Web services.

This is what it looks like for Web services

But no such options available for Windows service

aatanka
  • 31
  • 3
  • Does Windows service supports Azure Key Vault? These windows services will be deployed on Azure Virtual machine. What type of projects in C# support Azure Key Vault? – aatanka Aug 20 '21 at 15:28

1 Answers1

0

Try with these steps

1. choose Add > Connected Service .Click on + The Connected Service page appears with services you can add to your project.

enter image description here

2. choose Azure Key Vault and click Next.

enter image description here

3. Select the subscription you want to use, and then choose a existing Key Vault and click Finish

enter image description here

For more details refer this document

ShrutiJoshi-MT
  • 1,622
  • 1
  • 4
  • 9
  • The problem with windows service is that there is no **Service dependencies** option available (please refer to second image of the question). It has **Service Reference** option which doesn't have key vault dependency. – aatanka Aug 24 '21 at 15:57
  • I tried with using visual studio 2019 I am able to find Service dependencies option. Can you please try with modify Visual studio Or re-install Visual studio. – ShrutiJoshi-MT Aug 25 '21 at 03:32
  • I am using Visual studio 2019 too. And I can see the Services dependencies option for **Web service** ( first image of the question). But, there is no such option (Service dependencies) for **Windows service** (Second Image of the question). Looks like you tried with web service which works for me too but Windows service did not work. Any idea ? – aatanka Aug 25 '21 at 21:01