How to safely hide database credentials in a C # application?

I have a situation where users access a remote MySQL server in a C # application.

Basically,

A user using the C # application on his desktop → →> connects to the remote → → → →> [REMOTE]

How to safely hide database connection details?

I have few ideas, but I don’t think they are safe.

  • Encrypt database connection data to a file and store it in the application directory.
  • enter the username and password, and then transfer the data about connecting the database to the user computer.
+3
source share
3 answers

, , , .

, , , , .

+5

. .

For example, you can accomplish this by simply wrapping access to the database using the internal system. Your desktop clients do not pay attention to the database and interact exclusively with the internal system. Unfortunately, implementing this level of indirection is not trivial if you have to do it from scratch, but it will certainly make your application more reliable and flexible. WCF services can help with this.

0
source

Source: https://habr.com/ru/post/1721944/


All Articles