Encrypting Web.Config Values in ASP.NET 2.0
One of the cool new features in the configuration system with ASP.NET 2.0 is the ability to encrypt any of the values stored within them (note: this works with any configuration section -- including ones you build yourself). This is obviously important when storing sensitive information like connection strings -- and now enables you to avoid having to roll your own solution.
K Scott Allen posted a super simple example of how to encrypt a section on his blog (spolier: it is a one-line command).
Here are a few other good articles I found on the web that discuss it more as well:
- Update: http://www.developerfusion.co.uk/show/5263/
- http://msdn.microsoft.com/en-us/library/zhhddkxy.aspx
- http://blogs.msdn.com/federaldev/archive/2005/11/08/490319.aspx
- http://msdn.microsoft.com/en-us/library/dtkwfdky.aspx
- http://aspdot.net/articles/encryptedconnstring/
- http://davidhayden.com/blog/dave/archive/2005/11/17/2572.aspx
- http://weblogs.asp.net/owscott/archive/2005/07/29/421063.aspx
Hope this helps,
Scott
P.S. While I'm mentioning building your own configuration sections, I thought I'd point out this past blog post i did that references Dmitry's cool utility for building your own custom configuration sections + VS 2005 XML intellisense support for them.