473,699 Members | 2,384 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Application settings

Hi

Is there an easy way to allow user to change application settings at run
time short of editing the configuration file manually?

Thanks

Regards
Feb 13 '08 #1
3 2482
"John" <Jo**@nospam.in fovis.co.ukschr ieb:
Is there an easy way to allow user to change application settings at run
time short of editing the configuration file manually?
This can be done for user settings ('My.Settings') , but it is not possible
for settings whose scope is the whole application. In the latter case users
typically do not have the rights to write the configuration file.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Feb 13 '08 #2
have a look at
http://www.emoreau.com/Entries/Artic...revisited.aspx

--

HTH

Éric Moreau, MCSD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc. (http://www.emoreau.com)
Membre du réseau .NET Expertise (www.dotnet-expertise.com)

"John" <Jo**@nospam.in fovis.co.ukwrot e in message
news:uS******** ******@TK2MSFTN GP04.phx.gbl...
Hi

Is there an easy way to allow user to change application settings at run
time short of editing the configuration file manually?

Thanks

Regards
Feb 14 '08 #3
Actually I have googled and am looking for something like this

http://www.codeproject.com/KB/cs/configeditor.aspx

which would let the user edit application settings easily. Unfortunately
this one does not load my app.config (given below) for some reason.

Regards

<?xml version="1.0" encoding="utf-8"?>
<configuratio n>
<configSections >
<sectionGroup name="applicati onSettings"
type="System.Co nfiguration.App licationSetting sGroup, System,
Version=2.0.0.0 , Culture=neutral , PublicKeyToken= b77a5c561934e08 9">
<section name="EMS.My.My Settings"
type="System.Co nfiguration.Cli entSettingsSect ion, System, Version=2.0.0.0 ,
Culture=neutral , PublicKeyToken= b77a5c561934e08 9" requirePermissi on="false"
/>
</sectionGroup>
</configSections>
<connectionStri ngs>
<add name="EMS.My.My Settings.EMSDat aConnection"
connectionStrin g="Provider=Mic rosoft.Jet.OLED B.4.0;Data Source=&quot;C: \EMS
2008\Data\Event s Manager Data.mdb&quot;" providerName="S ystem.Data.OleD b" />
</connectionStrin gs>
<system.diagnos tics>
<sources>
<!-- This section defines the logging configuration for
My.Application. Log -->
<source name="DefaultSo urce" switchName="Def aultSwitch">
<listeners>
<add name="FileLog" />
<!-- Uncomment the below section to write to the Application Event
Log -->
<!--<add name="EventLog"/>-->
</listeners>
</source>
</sources>
<switches>
<add name="DefaultSw itch" value="Informat ion" />
</switches>
<sharedListener s>
<add name="FileLog"
type="Microsoft .VisualBasic.Lo gging.FileLogTr aceListener,
Microsoft.Visua lBasic, Version=8.0.0.0 , Culture=neutral ,
PublicKeyToken= b03f5f7f11d50a3 a, processorArchit ecture=MSIL"
initializeData= "FileLogWri ter" />
<!-- Uncomment the below section and replace APPLICATION_NAM E with the
name of your application to write to the Application Event Log -->
<!--<add name="EventLog"
type="System.Di agnostics.Event LogTraceListene r"
initializeData= "APPLICATION_NA ME"/-->
</sharedListeners >
</system.diagnost ics>
<applicationSet tings>
<EMS.My.MySetti ngs>
<setting name="ClientErr orLogEmailRecip ient" serializeAs="St ring">
<value>in**@myd omain.co.uk</value>
</setting>
<setting name="ErrorLogE mailFrequency" serializeAs="St ring">
<value>1</value>
</setting>
<setting name="Sender" serializeAs="St ring">
<value>EM****** ***@mydomain.co .uk</value>
</setting>
<setting name="SMTPServe r" serializeAs="St ring">
<value>smtp.myi sp.co.uk</value>
</setting>
<setting name="strLocalD DB" serializeAs="St ring">
<value>"C:\Blah Blah\Replica of MyDB.mdb"</value>
</setting>
<setting name="strRemote DDB" serializeAs="St ring">
<value>"F:\Blah Blah\MyDB.mdb"</value>
</setting>
</EMS.My.MySettin gs>
</applicationSett ings>
</configuration>
"rowe_newsgroup s" <ro********@yah oo.comwrote in message
news:fc******** *************** ***********@s8g 2000prg.googleg roups.com...
On Feb 13, 9:47 am, "John" <J...@nospam.in fovis.co.ukwrot e:
>Hi

Is there an easy way to allow user to change application settings at run
time short of editing the configuration file manually?

Thanks

Regards

Dang, do you search for anything?

If you didn't know, this group is archived at:

http://groups.google.com/group/micro...=gschg&safe=on

Most of your answers could be found there or by searching google.

Thanks,

Seth Rowe [MVP]

Feb 15 '08 #4

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

Similar topics

8
2717
by: Google Mike | last post by:
I need an Application object replacement. I was creating my own using shared memory -- shm* API in PHP. I was doing fine for 6 months until it just got too fat, I guess, and the RH9 Linux server just started "losing its memory". I don't know -- perhaps I'm doing something wrong, perhaps it's my code, or perhaps there's a limitation on what I'm trying to do here. It's too many lines of code to debug right now. I'm searching for...
1
2759
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 like: ================================================ <?xml version="1.0" encoding="utf-8" ?>
4
1550
by: Lars Netzel | last post by:
I just saw this program called Handy Backup 4.5 where you can add backup jobs as such... and I wonder where you normally save data in an application. I come from an ASP world and have started to get into Windows Forms and Desktop programming and for me it's always been a Database-Way to go when wanting to save data.. or in the Registry when it comes to usersettings. But in the application I was looking at I looked into the installation...
1
1882
by: Cristian | last post by:
Hi I have some trouble (on only one developer computer) with the application settings functions... I have posted to the Microsoft.Public.vstudio.setup group but they couldn't help me and asked me to post in this forum. I paste both the messages I posted there.. --- Hi I have just installed VS2005 and the first thing I did was to try out the new Screensaver sample. that wouldn't work it just crashed all the time.
2
13134
by: Bob | last post by:
The my.settings name space is easy to use to modify User settings from within code, but the application settings can't seem to be modified that easily. I want the user to be able to modify some of the application setting ( like my connection strings) through a friendly user interface on one of my forms, without having to go in the .config file with notepad. If its in my code I can do testing and validating when he chages things. Any...
3
3178
by: Jon Slaughter | last post by:
I wrote an app that needed to save settings such as colors, fonts, etc... after hours of trying to use ConfigurationManager and AppSettings along with a few other things I finally found that I could just use global::Properties.xxx.Settings.Default.yyy where xxx is the namespace and yyy is a setting created in the settings dialog. This is an extremly easy way to save and restore properties but I'm wondering how general it is and if its...
3
4789
by: xycos | last post by:
Hello. I apologize for asking this question as the information I need is availible via the MSDN library, however I cannot seemt o understand what I need to do, so I'm asking here. I have created application settings in Visual Studio (right-click on the project, go to the settings tab, etc.) and have associated each of these settings with a property on a form. This seems to be working right (i.e. if I edit the default value of a setting,...
0
3995
by: steve | last post by:
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 :--
1
1811
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 application settings, such as: Settings.Default.host = some value; Settings.Default.port = some value; Settings.Default.userName = some value;
1
4515
by: BobLewiston | last post by:
I tried to compile a Windows Forms Application in Visual C# 2008 Express with this source code from the CSharpSchool tutorial at Programmer's Heaven:using System; using System.Windows.Forms; using System.Drawing; namespace CSharpSchool { class HelloWinForm { static void Main () { Application.Run (new MyWindow ());
0
8685
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9172
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8908
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8880
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7745
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6532
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2344
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.