CFanatic

Go Back   CFanatic > Programming > C# Programming

Join CFanatic Forum Now

Maintaining custom config sections accross application updates topic posted under C# Programming which is a part of Programming category in CFanatic Forum
Reply
 
Thread Tools Display Modes
  #1  
Old 09-03-2010, 02:14 PM
Junior Member
 
Join Date: Sep 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
KeithBoynton is on a distinguished road
| More
Maintaining custom config sections accross application updates

I have a Visual C# 2008 Express project which I deploy via ftp to a website using ClickOnce deployments.

My application has a custom configuration section in app.config as shown below:

Code:







I'm loading and referencing the section like this:

Code:
ExeConfigurationFileMap fileMap = new ExeConfigurationFileMap();
fileMap.ExeConfigFilename = sConfigFilename;
this.oApplicationConfiguration = ConfigurationManager.OpenMappedExeConfiguration(fi leMap, ConfigurationUserLevel.None);
this.oWatchConfig = (WatchConfiguration)this.oApplicationConfiguration .GetSection("WatchConfiguration");

I have the config bound to various fields on a config form. Which all works fine.

I save the config like this:

Code:
this.oConfigApplicationConfiguration.Save();

This all works fine and persists the config accross application sessions.

However, the configuration is lost on each publish of a new version of the application using ClickOnce deployments.

I've googled and read numerous articles on persisting settings accross updates and all seem to reference "settings" which isn't really what I'm using. Maybe I should be.

Any help would be greatly appreciated!!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error loading custom cursor bijan311 Win32 Programming 0 08-31-2010 04:11 AM
Custom URI schemes Epy C# Programming 0 08-31-2010 04:11 AM
Losing updates made to a user control seatllesteve C# Programming 1 06-27-2010 12:33 AM
Custom application setting cygnusX C# Programming 0 10-08-2007 09:15 AM
Custom FileDialog Rob C# Programming 1 01-19-2007 09:08 PM

 

Advertisement

CFanatic Search
Custom Search

Advertisement

All times are GMT -5. The time now is 04:14 PM.



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO ©2010, Crawlability, Inc.
Cfanatic.com is a premier member of the IDG TechNetwork. For advertising opportunities contact here
Get Paid for Working on Projects Matching Your Expertise at Go4Expert's Jobs Board