views:

96

answers:

2

I have many ASP.NET applications running on server and i want to encrypt the web.config file for each. Is there a way I can encrypt all config files using single class/app or do i have to write separate code under each solution/project to encrypt config?

I have idea how to do one file in a project using http://davidhayden.com/blog/dave/archive/2005/11/17/2572.aspx

But i want to use a centralized or single app to encrypt all Any other suggestions will be helpful too

+4  A: 

.NET allows you to implement your own ProtectedConfigurationProvider. With it, you can store your configuration data outside of a standard configuration file, encrypt it however you like, or redirect requests for configuration in any way you see fit. Simply plug your new Provider into every project that needs it. Start here:

Corbin March
Thanks Corbin. I Was looking for this again after using it awhile back, great links. cheers!
Tj Kellie
A: 

You might also like to experiment with Aspnet_regiis.exe. as per this link

" You can easily export and import RSA keys from server to server. This makes RSA encryption particularly effective for encrypting configuration files used on multiple servers in a Web farm."

Gaurav Kumar