2

I'm creating a c# client to be installed on a third party server to allow an easy monitoring system.

This c# client would send info to us, and so, I thought to send data to a mongoDB server. Easily done, it works, but ...

But I'm not aware of how save in c# code or in app settings the connection string in a way that cannot simply be see in plain text using, for example, ilspy or similar.

I know that all is reversible, but is there a way to obfuscate a string or crypt it or what else to just be a bit more safer?

In S.o. I consulted the follows

HEWhoDoesn'tKnow
  • 347
  • 3
  • 14
realtebo
  • 23,922
  • 37
  • 112
  • 189

1 Answers1

1

Well as you said it's all reversible so we've got that out of the way.

If you simply want to make it harder without going into much effort and there is no need to modify the string often, leave it out of the configuration and store it in code, then use a code obfuscator, a lot of them will obfuscate strings. For example Smartassembly will do that.

Ronan Thibaudau
  • 3,413
  • 3
  • 29
  • 78