Solved

Applicaton Settings Disappearing

Posted on 2007-11-15
4
246 Views
Last Modified: 2013-12-17
I am working in VB.Net using application settings to store preferences rather than an INI file or the registry. I defined all of the settings in Visual Studio under project properties and settings. All of the settings are user in scope. This works well most of the times, but on occasion the settings disappear. I haven’t been able to put a finger on what I do to erase them.

Two questions:
1)      What am I doing wrong and how do I fix it?
2)      Is there something other than settings that I should be using?

Thanks
Randy
0
Comment
Question by:randymiller
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 18

Expert Comment

by:jcoehoorn
ID: 20293186
Do you have it set to save settings automatically on exit, or do you call my.settings.save?
0
 

Author Comment

by:randymiller
ID: 20293911
Yes, that part isn't a problem. I can exit and launch the program several times with no problems, then when I go in they are all blank. It isn't tht they didn't get updated, but that they got wipped out.

The vast majority of my experiense is in the debug environment, could the config file be deleted or moved?
0
 

Author Comment

by:randymiller
ID: 20294089
I am not sure, but it may happen when I publish.

Randy
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 20294448
It is a fact then when you publish, you loose your user's settings. Search for "CallUpgrade" from http://www.emoreau.com/Entries/Articles/2007/03/AppSettings-revisited.aspx for a workaround
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question