473,387 Members | 1,464 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,387 software developers and data experts.

Winforms app, user setings don't get persisted.

Bob
Winforms application in VS2005 using VB.
Have some code that sets a user setting using the my.settings code
For instance My.Settings.ThisSetting = "New setting" then My.settings.Save()
to explicitly save it.
After doing this I close the application, look at the application's config
file and see that the ThisSetting is not New Setting but is still the old
setting. When I open the application again, I can see that the old setting
is still being used.

This occurs when running the distributed executable. In the development
environment when I run it in debug mode I can also see that the config file
of the vshost does not persist the change.

How can I persist the changes I need to make to the app.config file? I want
to try to avoid having to use Notepad to edit the config files.
I had a class doing this in my 2003 application but the xml text that
appears to need to be changed looks quite different between what was used in
2003 config files and in 2005 config files.

I would realy appreciate any help with this problem.

Bob

Aug 13 '06 #1
1 1628
Bob
Looks like problem was 18 inches from screen, got it working.
Found that to persist, had to close application after doing save, not sure
why this seems to be so. In any case I'm gonna call this one good enough.

Bob
"Bob" <bd*****@sgiims.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
Winforms application in VS2005 using VB.
Have some code that sets a user setting using the my.settings code
For instance My.Settings.ThisSetting = "New setting" then
My.settings.Save() to explicitly save it.
After doing this I close the application, look at the application's config
file and see that the ThisSetting is not New Setting but is still the old
setting. When I open the application again, I can see that the old setting
is still being used.

This occurs when running the distributed executable. In the development
environment when I run it in debug mode I can also see that the config
file of the vshost does not persist the change.

How can I persist the changes I need to make to the app.config file? I
want to try to avoid having to use Notepad to edit the config files.
I had a class doing this in my 2003 application but the xml text that
appears to need to be changed looks quite different between what was used
in 2003 config files and in 2005 config files.

I would realy appreciate any help with this problem.

Bob



Aug 13 '06 #2

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

Similar topics

10
by: BBFrost | last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net 2003. At first things were looking ok, now problems are starting to appear. So far ... (1) ...
20
by: Martin Rosén-Lidholm | last post by:
Although an impossible question to answer, I fell urged to raise it anyhow. Given a fairly complex ERP application scenario, what's your estimation for the X-ratio dev. time for...
0
by: clintonG | last post by:
I applied aspnet_regsql to SQL2K which was working fine throughout Beta 2 development. After installing Visual Studio and SQL Express RTM my application has blown up. Logging in to the application...
5
by: Segfahlt | last post by:
I need a little help here please. I have 2 win forms user controls in 2 different projects that I'm hosting in 2 different virtual directories. The controls have been test and operate okay in...
1
by: Pieter | last post by:
Hi, In my application VB.NET 2005 application I placed a ReportViewer, and link it to a server-report: Me.ReportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote...
2
by: deko | last post by:
When to use a privileged user thread rather than a windows service? That's the question raised in a previous post . It was suggested that if the service needs to interact with a WinForms app...
5
by: brian.wilson4 | last post by:
Our group is currently comparing winforms vs webforms.....app is Corp LAN based - we have control of desktops.....Below is pros and cons list we have come up with - if anything strikes you as...
4
by: Scott M. | last post by:
When profile data is stored in ASP .NET, where is the user data persisted? For how long is it persisted: is it session persisted or permanent (like a cookie)?
23
by: raylopez99 | last post by:
Here I am learning WinForms and two months into it I learn there's a WPF API that is coming out. Is this WPF out yet, and is it a threat to WinForms, in the sense that all the library routines I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.