How to make a safety connection string?
Posted: Tue Dec 08, 2015 7:30 pm
Hi there,
for some reason I must develop an application in vb.net, now this application execute a connection with a database, for the moment I save the connectino details in the settings of App.config, so I've this structure:
for some reason I must develop an application in vb.net, now this application execute a connection with a database, for the moment I save the connectino details in the settings of App.config, so I've this structure:
Code: Select all
Now I want to know how I can encrypt this information, in particular (username, password, database, server_name). Someone could made a tutorial for this?<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="Test_Sync.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
<userSettings>
<Test_Sync.My.MySettings>
<setting name="server_name" serializeAs="String">
<value />
</setting>
<setting name="username" serializeAs="String">
<value />
</setting>
<setting name="password" serializeAs="String">
<value />
</setting>
<setting name="database" serializeAs="String">
<value />
</setting>
<setting name="state" serializeAs="String">
<value>False</value>
</setting>
</Test_Sync.My.MySettings>
</userSettings>
</configuration>