rs.
rs.

Reputation: 27427

Encrypting config files info

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

Upvotes: 0

Views: 335

Answers (2)

gauravphoenix
gauravphoenix

Reputation: 3082

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."

Upvotes: 0

Corbin March
Corbin March

Reputation: 25724

.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:

Upvotes: 4

Related Questions