A better way to store user preferences in .NET apps?

It is definitely a conundrum. Do you use the registry? (easy as pie to code to, with lots of potential security and other issues) Do you leverage Isolated Storage? (a very secure way to write and read local files in managed code, but designed for files – which means a lot of coding to get info in and out.)

I started out with the easy way I was already familiar with – the registry. Then when I got bit with my first registry permission problem, I learned how to use Isolated Storage and had to code up all of the file stream, read line, write line business which is a PIA (though I suppose I could create an xml file, store it in isolated storage, open it up in a datarow and grab what I need). So I was happy to see what looks like an awesome article in this month’s MSDN Mag (as of this writing  – most of the articles are not online yet) called User Preferences: Manage User Settings in Your .NET App with a Custom Preferences API by Ray Djajadinata. I have read enough of the article so far to recognize all of the same walls I have encountered with this, so I look forward to digging further in to read about how Ray has solved this problem.

  Sign up for my newsletter so you don't miss my conference & Pluralsight course announcements!  

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.