Author: user2009 | Posted on: 10/23/2009 4:00:05 PM | Views : 239

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 ...