Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3392460
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T03:55:24+00:00 2026-05-18T03:55:24+00:00

I have a desktop application that on first execution prompts for the connection details

  • 0

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.

Normally I just use the My.Settings namespace in .Net but is that going to cut it in this environment?

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.

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

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?

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?

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T03:55:24+00:00Added an answer on May 18, 2026 at 3:55 am

    As you already wrote, you need to make sure your saved settings end up in the roaming part of the profile. That can either be the registry hive HKEY_CURRENT_USER or the folder %APPDATA% which resolves to %USERPROFILE%\AppData\Roaming (on Vista and newer, but also to the locale-specific roaming AppData folder on older operating systems).

    In .NET, user-specific settings can be stored both in the roaming and local parts of the user profile. In order for settings to roam, the “Roaming” property needs to be set to true. See this article for an explanation and also for the paths the settings actually get saved at:

    http://www.codeproject.com/KB/vb/appsettings2005.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.