Encrypt password in App.config

后端 未结 4 866
渐次进展
渐次进展 2020-11-27 04:21

I want to encrypt the password in connection string. When I make a connection to DB the connection string is openly stored in App.config and I need to find a way to keep onl

4条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-27 04:35

    As an addition to the other answers, isn't it better to use the file in Source Control as a template, with just dev/test encrypted connection strings so that it works in dev/test.

    For production (or other environments the app is deployed to), the encrypted credentials file is generated separately to the specified template format, managed/updated/deployed separately, has appropriate security permissions applied, never seen by anyone other than DBA/DevOps.

提交回复
热议问题