Encrypt password in App.config

后端 未结 4 875
渐次进展
渐次进展 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:38

    Use the connectionStrings configuration section and encrypt the whole section - instead of just the password.

    This is safer as your app config will no longer have the server names and user names in plain text either.

    There are how-to documents for encrypting configuration sections on MSDN for RSA or DPAPI.

提交回复
热议问题