none
Encrypting ConnectionString for SQL Unit Tests RRS feed

  • Question

  • I have a number of SQL Unit Tests written in Visual Studio 2015. Currently they connect to the database (a SQL Azure Database) using static connection strings in an app.config file.

    I would like to protect this information using Azure Key Vault if possible.

    Is it possible to encrypt the app.config file or sections of it? (Keep in mind these are SQL Unit Tests not a .NET Web App)

    Or is there another solution such as overriding the ExecutionContext which is used by the TestService?

    Thanks.

    • Moved by Oscar_Wu Friday, January 27, 2017 3:37 AM related to Azure SQL
    Wednesday, January 25, 2017 5:29 PM

Answers

All replies

  • Hi friend,

    This forum is discussing Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor.

    Your issue is related to SQL Azure Database develop, I will move this thread to corresponding forum for a professional answer.

    Sincerely,

    Oscar


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, January 27, 2017 3:36 AM
  • Hello,

    The key to unlock Vault is stored on the app.config, but you can use certificates to protect your app.config and the key to Vault. Please read the following article to know how.

    https://kamranicus.com/posts/2016-02-20-azure-key-vault-config-encryption-azure

    Hope this helps.



    Regards,

    Alberto Morillo
    SQLCoffee.com

    Friday, January 27, 2017 4:54 AM