Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

App Config updated from network question 1

Status
Not open for further replies.

Becks25Not

Programmer
Jun 23, 2004
176
US
Hi All,

I use an app config file for an application I have. I have code to check the local copy against a server copy and update the local if it's change. This works except that the new settings don't take affect until the next time the application is opened. Is there a way to reload the config file, or read the settings from the new one instead?

Any help would be greatly appreciated!
Thanks,
Becca
 
Just because I like preaching it.

DO NOT USE App.Config FOR DYNAMIC SETTINGS!!!

There are reasons why the App.Config tools are read only.

I would highly recommend using a seperate settings file stored in the user's documents and settings folder. Use a data table to create key-value pairs for all of your settings and save/read them with the dataset.readxml and dataset.writexml methods.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Hi Rick,

Thanks for responding -- the config file isn't for dynamic settings.

It is a launcher app and we use the config file to direct the masses to the current location. We don't just replace the files in the server directory because reflection locks them if someone is in it. We have had trouble in the past getting people out, etc so we figured we just reroute for new release then drop the old a could days later.

Thanks ~ Becca
 
Ahh, I >think< I understand.

If you are using a patcher/launch app the easiest and most common method I've seen is that if the patcher/launch app gets updated, after it updates, it asks the user to restart it. Although You could try launching the new app again in a new process, then ending the old app.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top