Hello All,
I have search the net on how can I encrypt my App.config that I created in VB Winform.
I found this article on this site
[
^]
What I`m expecting is that when I view the App.Config file in the Application Folder I should not be able to view the Database user and Password but, it does not seems to be working.
Here is my App Config Code.
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="EncrpytOracle_Connection"
type="System.Configuration.ClientSettingsSection, System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a561934e089"
requirePermission="false"/>
</sectionGroup>
</configSections>
<connectionStrings>
<add name="Oracle_Connection" connectionString="Driver=Microsoft ODBC for Oracle;uid=SOMEID;pwd=SOMEPWD;server=SOMEDB"/>
</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>">
As you can see in my connection string DB user Name, Password and Server is visible.
How do I encrypt it?
Please also check the my Class for decryption.
<pre lang="Imports System.Configuration<br mode=" hold=" /><br mode=" configurationsection=")<br mode=">
This is actually my 1st time to use app config encryption.
Can someone kindly give me an advice.
Thank you.