473,394 Members | 1,642 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 2468
"John" <Jo**@nospam.infovis.co.ukschrieb:
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.infovis.co.ukwrote in message
news:uS**************@TK2MSFTNGP04.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"?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings"
type="System.Configuration.ApplicationSettingsGrou p, System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="EMS.My.MySettings"
type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"
/>
</sectionGroup>
</configSections>
<connectionStrings>
<add name="EMS.My.MySettings.EMSDataConnection"
connectionString="Provider=Microsoft.Jet.OLEDB.4.0 ;Data Source=&quot;C:\EMS
2008\Data\Events Manager Data.mdb&quot;" providerName="System.Data.OleDb" />
</connectionStrings>
<system.diagnostics>
<sources>
<!-- This section defines the logging configuration for
My.Application.Log -->
<source name="DefaultSource" switchName="DefaultSwitch">
<listeners>
<add name="FileLog" />
<!-- Uncomment the below section to write to the Application Event
Log -->
<!--<add name="EventLog"/>-->
</listeners>
</source>
</sources>
<switches>
<add name="DefaultSwitch" value="Information" />
</switches>
<sharedListeners>
<add name="FileLog"
type="Microsoft.VisualBasic.Logging.FileLogTraceLi stener,
Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
initializeData="FileLogWriter" />
<!-- Uncomment the below section and replace APPLICATION_NAME with the
name of your application to write to the Application Event Log -->
<!--<add name="EventLog"
type="System.Diagnostics.EventLogTraceListener"
initializeData="APPLICATION_NAME"/-->
</sharedListeners>
</system.diagnostics>
<applicationSettings>
<EMS.My.MySettings>
<setting name="ClientErrorLogEmailRecipient" serializeAs="String">
<value>in**@mydomain.co.uk</value>
</setting>
<setting name="ErrorLogEmailFrequency" serializeAs="String">
<value>1</value>
</setting>
<setting name="Sender" serializeAs="String">
<value>EM*********@mydomain.co.uk</value>
</setting>
<setting name="SMTPServer" serializeAs="String">
<value>smtp.myisp.co.uk</value>
</setting>
<setting name="strLocalDDB" serializeAs="String">
<value>"C:\BlahBlah\Replica of MyDB.mdb"</value>
</setting>
<setting name="strRemoteDDB" serializeAs="String">
<value>"F:\BlahBlah\MyDB.mdb"</value>
</setting>
</EMS.My.MySettings>
</applicationSettings>
</configuration>
"rowe_newsgroups" <ro********@yahoo.comwrote in message
news:fc**********************************@s8g2000p rg.googlegroups.com...
On Feb 13, 9:47 am, "John" <J...@nospam.infovis.co.ukwrote:
>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
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...
1
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...
4
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...
1
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...
2
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...
3
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...
3
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...
0
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...
1
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...
1
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...

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.