encrypt SQL connectionstring c#

前端 未结 5 1066
离开以前
离开以前 2020-11-30 09:21

I created an c# application (not asp webpage) which connects to a sql 2005 server. In my sourcecode the password and userid for this sql-server is coded plain text in Connec

5条回答
  •  萌比男神i
    2020-11-30 09:36

    you can also store the UserName and Password in the Registry instead of storing in the config file. Read the Username and Password from registry when trying to connect to the database. Remember you have to Encrypt the Username and password while storing in the Registry and Decrypt the Username and Password while retrieving from the Registry.

提交回复
热议问题