Author: elshorbagy | Posted on: 8/23/2008 5:55:13 AM | Views : 527

 I'm trying to encrypt the coneection section using the below code
<%@ Import Namespace="System.Web.Configuration" %>

    private void EncryptConfig(bool Encrypt)
    {
        string path = "/Tricks";
        Configuration confige = WebConfigurationManager.OpenWebConfiguration(path);
        ConfigurationSection myAppSetting = confige.GetSection("pubsConnectionString");
        if (Encrypt == true)
        {
            myAppSetting.SectionInformation.ProtectSection("DataProtectionConfigurationProvider");
        }
        else
Go to the complete details ...