473,326 Members | 2,680 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

vb.net problem with Application Settings

I am using vb.net 2005 Express Edition.

Application Settings would be a very useful thing, as a global program database
that persists; if only it would work! Does anyone know a hack or a work-around
to get it working?

For me, it seems to mess up the path of the folder where user.config is saved.

If I Access the property :--

System.Windows.Forms.Application.LocalUserAppDataP ath

I get the path :--

C:\Documents and Settings\Steve\Local Settings\Application
Data\TestSettings\TestSettings\1.0.0.0

So, far, so good.

When I _start_ my simple program "TestSetting", (in the development
environment), this path is created.

My prog modifies the Application data then exits. At this stage, the folder
\1.0.0.0 remains empty and nothing is saved.

The Application Data should be saved automatically as user.config as
"SaveMySettingsOnExit" is set True.

I can force a save by putting My.Settings.Save() in a "FormClosed" event.

As before, the above path is created when the form opens. When the form closes
another new path is created :-

C:\Documents and Settings\Steve\Local Settings\Application
Data\TestSettings\TestSettings.vshost.exe_Url_fjhp mbnnff0bekbzchwj1qyrrslcm5tz\1.0.0.0

(The gibberish bit changes if I delete the folder and try again; the
..vshost.exe_Url_ part remains).

User.config is in this new wacky folder; on the next program run the data is
fetched from there and persists okay.

--------

If I run the release version of my code it is the same, except the 2nd path
created is now :-

C:\Documents and Settings\Steve\Local Settings\Application
Data\TestSettings\TestSettings.exe_Url_22ttqho3h30 hjk4oc1nrv02qvlafq5ql\1.0.0.0

(I don't have the "vshost" bit now).

Because vb confuses itself over the path, the synchronize function no longer
works on the Application Settings screen. I get the error "No user.config files
were found in any of the following locations:" - but no list of locations.

--------

If I use Application Settings in a more complex program, it is even more
problematic - I have to include My.Settings.Save(), but some items are saved
but others omitted in the User.config file.

Does anyone else encounter this?

Steve.

--
Posted via a free Usenet account from http://www.teranews.com

Feb 13 '07 #1
0 3966

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: serge calderara | last post by:
dear all, I have problem accessing section group in my configuration application file. I got an error saying thta I can have only one section ???? here is my application configuration looks...
7
by: MrNobody | last post by:
I was a Java developer so I'm used to using property files as a means to keep configuration settings for my apps. I'm wondering what options are there with ..NET? Some settings I want to include...
4
by: Richard Lewis Haggard | last post by:
I have an application that can't use the registry to save various user options and application settings. My first thought was to simply use an application configuration file but this approach seems...
0
by: Marc | last post by:
Hello, I have a problem with the settings (save and load) My.Settings in VB.NET2005. Actually, I have made a new application, then I have created a setting (with a default value) and then I...
5
by: David McCallum | last post by:
The object of the code snippet below is to save and restore a form's size and location. The saveFormSettings() method is called when a form is closing and restoreFormSettings() is called after...
11
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
I have worked with application settings in VS2005 and C# for awhile, but usually with standard types. I have been trying to store a custom container/class/type in an application setting and I have...
1
by: matthewlowrance | last post by:
I have an application that uses the Application Settings Architecture (My.Settings) to store its settings. Everything works fine except one of our users uses Citrix systems. On those systems...
1
by: =?Utf-8?B?UmF5IE1pdGNoZWxs?= | last post by:
Hello, I've done this type of thing many times before so I know it works, but for some reason it's not working in this particular application. In an event handler I save some values into the...
5
matheussousuke
by: matheussousuke | last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails. The goal is: Make it send the email with the URL...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.