To encrypt/ decrypt connection string information stored in the Web.config file.



how to encrypt the connectionStrings section of the Web.config file for an application named SampleApplication:
 At the Windows command line, run the below commands.
                

1-      cd \WINDOWS\Microsoft.Net\Framework\v2.0.
                      ** (choose the .net version, here I select v2.0)
2-      aspnet_regiis -pe "connectionStrings" -app "/MyApplication"

·         The -pe option, passing it the string "connectionStrings" to encrypt the connectionStrings element.
·         The -app option, passing it the name of your application.
The aspnet_regiis.exe tool is located in the %systemroot%\Microsoft.NET\Framework\versionNumber folder.

 

how to grant the NETWORK SERVICE account access to the machine-level "NetFrameworkConfigurationKey" RSA key container
  At the Windows command line, run the below commands.

1-      Cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
2-      aspnet_regiis -pa "NetFrameworkConfigurationKey" "NT Authority\Network Service"

how to decrypt the connectionStrings element of ASP.NET application SampleApplication.
 At the Windows command line, run the below commands.

1-      Cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
2-  aspnet_regiis -pd "connectionStrings" -app "/SampleApplication"


Comments

Popular posts from this blog

How to install glibc 2.14 on RHEL 6/ RHEL 7/ CentOS 7

Export and Import users/groups and OU in AD Server 2008 using LDIFDE command.

How to Set Up and Configure latest yum repository on CentOS