Hi,
Below is the code that I am using to encrypt the "connectionString" section in the app.config file.
' Get the current configuration file.
Dim config As Configuration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None)
Dim protectedSection As ConfigurationSection = config.GetSection(sectionName)
' Encrypts when possible
If ((protectedSection IsNot Nothing) _
AndAlso (Not protectedSection.IsReadOnly) _
AndAlso (Not protectedSection.SectionInformation.IsProtected) _
AndAlso (Not ...
Go to the complete details ...