Posted on: 9/27/2012 1:23:43 AM | Views : 212

Hi, The below is the connection string in Web.Config File. <connectionStrings>
<add name="DBConnectionString" connectionString="Data Source=localhost;Initial Catalog=Master;User ID=sa;Password=t1234@asd" providerName="System.Data.SqlClient" />
We are Using Inproc Session:
<sessionState mode="InProc"
cookieless="false"
timeout="1440"/>
I need to Encrypt and Decrypt ConnectionString. Example: I seacrh in google ,   So i tried with RSAProtectedConfigurationProvider.
 when i encrypt the file in web.config , the connectionstring is encrypted.
Configuration confg =WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath);
ConfigurationSection configSect = confg.GetSection("connectionStrings");
if (configSect != null)
{
configSect.SectionInformation.Pro ...

Go to the complete details ...