473,734 Members | 2,211 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 2488
"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
2719
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
2764
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
1555
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
1886
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
13136
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
3181
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
4793
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
3998
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
1812
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
4519
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
8776
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9449
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
9236
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
9182
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
8186
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
6735
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
4550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2724
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.