How to securely store a connection string in a WinForms application in app.config?

  • Thread starter Thread starter sh 2018
  • Start date Start date
S

sh 2018

Guest
Hello Everybody

I need to know what is the common way to store a SQL server connection string for a WinForms application in VB.NET

my Config Value is:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
</configSections>
<connectionStrings>
<add name="EncryptCn.My.MySettings.databaseConnectionString" connectionString="Data Source=192.168.0.1;Initial Catalog=PersonData;User ID=SA;Password=12345678"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.diagnostics>
<sources>
<!-- This section defines the logging configuration for My.Application.Log -->
<source name="DefaultSource" switchName="DefaultSwitch">
<listeners>
<add name="FileLog"/>
<!-- Uncomment the below section to write to the Application Event Log -->
<!--<add name="EventLog"/>-->
</listeners>
</source>
</sources>
<switches>
<add name="DefaultSwitch" value="Information" />
</switches>
<sharedListeners>
<add name="FileLog"
type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
initializeData="FileLogWriter"/>
<!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to the Application Event Log -->
<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
</sharedListeners>
</system.diagnostics>
</configuration>

thanks all



Name of Allah, Most Gracious, Most Merciful and He created the human

Continue reading...
 
Back
Top