0

I am going to send a C# project to a company for a test for application, but I realized I do not know something fundamental. I am using my website's sql server and when I send the project the person who will examine the code will see it.

Is there a way to hide it? In a dll or something?

zgrkpnr89
  • 325
  • 1
  • 6
  • 17

1 Answers1

1

The solution is obviously to remove sensitive information from connection string somehow. I can think of two minimal effort ways:

  1. Use MSSQL's Windows integrated authentication. You'll need to run your application pool under account that has permissions on the database, but that way connection string won't contain username or password in it, just Integrated security=true;
  2. Remove connection string from all project files and add it only on pre build event. You can store it in a local file outside of project directory. If you store connection string in a web.config file, one way to transform it is through TransformXML.
Community
  • 1
  • 1
cyberj0g
  • 3,707
  • 1
  • 19
  • 34