473,569 Members | 2,770 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 2476
"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
2715
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...
1
2745
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
1549
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...
1
1875
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...
2
13122
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...
3
3171
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...
3
4774
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...
0
3994
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
1807
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
4504
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...
0
7694
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...
0
7609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7921
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. ...
0
8118
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7666
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...
0
7964
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...
1
5504
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...
0
5217
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...
0
3636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.