2

I am making one app right now, and I have a question:

Where can I store my MySQL connection string so nobody will be able to get it (for example with .NET Reflector). Encrypting it into app.conf won't be good. I need it to work even on other computers not just the one I encrypted it on.

nabulke
  • 11,025
  • 13
  • 65
  • 114
  • Possible duplicate of [C# secure connection info for MYSQL](http://stackoverflow.com/questions/27755981/c-sharp-secure-connection-info-for-mysql) – C4d Apr 04 '16 at 12:49

1 Answers1

1

check this link how to secure connection string

Add Connection String to Web.confif/App.config

  1. Open an .aspx page in Design View in Visual Studio.
  2. From the Toolbox, from the Data folder, drag a data source control, such as a SqlDataSource control, onto the design surface.
  3. Right-click the control, and click Show Smart Tag.
  4. In the smart tag panel, click Configure Data Source.
  5. In the Choose a Data Connection panel, click New Connection.
  6. Select an appropriate data source from the list on the Choose Data Source dialog box, and then click OK.
  7. Indicate the correct server name, user name, and password on the Add Connection dialog box, and then click OK. You are returned to the Configure Data Source dialog box with a summary of your connection details.
  8. Click Next, and then click Yes to save your connection string in the Web.config file.

To encrypt connection string information stored in the Web.config file

aspnet_regiis -pe "connectionStrings" -app "/SampleApplication"

For more details check the link shared above

rashfmnb
  • 9,959
  • 4
  • 33
  • 44