I have created a application with c#. I define a connection string in app config file. Here is my app config file code:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="True">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>
  <appSettings>
    <add key="con" value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\myFolder\Mydb.mdb;Persist Security Info=True;Jet OLEDB:Database Password=bd1234" />
  </appSettings>
</configuration>
I want to create that code to this following format and encrypted password value.
<?xml version="1.0"?>
<configuration>
  <configSections>
  </configSections>
  <appSettings>
    <add key="ServerName" value="user"/>
    <add key="Provider" value="Microsoft.Jet.OLEDB.4.0"/>
    <add key="Data Source" value="C:\myFolder\Mydb.mdb"/>
    <add key="Persist Security Info" value="True"/>
    <add key="Jet OLEDB:Database Password" value="*******"/>
  </appSettings>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>    
</configuration>
How can i do that?
 
     
     
    
