title: What is the best practice for storing settings in a .Net Winforms app that may be deployed in a Citrix environment?
body: <p>I have a desktop application that on first execution prompts for the connection details to the database and then I want to retain them for future use (as an encrypted string) so that the next time the user starts up the app they can be re-used.  Now the client runs a citrix environment which I haven't really had any exposure to before and I want to make sure that this encrypted database string is saved in such a way that it is available to the user wherever they log in from - I think that what I'm saying is that the application needs to be aware of this setting in their roaming profile but this is something I haven't really had to worry about before so I'm just checking whether there are any gotchas that I need to be aware of.</p>
  
  <p>Normally I just use the My.Settings namespace in .Net but is that going to cut it in this environment?</p>
  
  <p>I'd appreciate anyone who knows a "best practice" for saving user settings in such a way that a roaming user will  not be challenged to enter their settings again when they log in from a new location.</p>
  
  <p>The reason for setting the DB connection in this way is that there is a Test and a Live database that the user can switch between (identical databases, different servers).</p>
  
  <p>Would it be better to store the live and test connection strings in the app.config and allow the admins to manually update them after installation and then provide a switch to go from test to live in the UI?</p>
  
  <p>I generally work on asp.net sites where everything lives happily in the web.config so this is a bit of a step outside my comfort zone.  I can see quite a few options in the books but I'm wondering if anyone has any advice on which technique works best for them?</p>
  
  <p>I'm using VB.Net 3.5 (Visual Studio 2010).  It's a windows forms project with a handful of .dll libraries in the solution where the actual DB accessing takes place.</p>