yes.I am using .net 2.0
You can only encrypt certian sections of the web.config file. The most important ones are your applicationSettings and your connectionStrings.
To encrypt the applicationSettings section:
(Be sure to change "ApplicationName" to the name of your application.)
- On command line go to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
- type: aspnet_regiis -pe “appSettings" -app "/ApplicationName" -prov "DataProtectionConfigurationProvider"
To encrypt the connectionStrings section:
- On command line go to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
- Execute aspnet_regiis -pe "connectionStrings" -app "/ApplicationName" -prov "DataProtectionConfigurationProvider"
To change the sensitive sections in the web.config back to clear text, execute the following steps on the computer where the web.config file was encrypted.
- On command line go to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
- Execute aspnet_regiis -pd "connectionStrings" -app "/ApplicationName"
To change the appSettings section of the web.config file back to clear text:
- On command line go to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
- Execute aspnet_regiis -pd "appSettings" -app "/ApplicationName"
Please note that this should be done on the web server where your application is hosted.
Also note that if you encrypt the web.config file on one machine it cannot be used, nor de-encrypted on another machine.
Cheers!
-Frinny