473,657 Members | 2,851 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Persisting Application Scoped Settings

What what I have read, Application Scoped settings in the setting file
are read only. Why is this? Is there a good reason for this
restriction?

I understand that some settings will be different for each user of the
app, hence the User Scoped settings. User scoped settings can be
changed and persisted at runtime.

But there are also settings that are not User Scoped (i. e.
Application Scoped) that still might need to be changed at runtime,
yet this is not possible. Why? Again, is there some good technical
reason for this restriction?

What alternatives are available to me to be able to persist
Application Scoped settings?

Thanks,

Chris

Jul 13 '07 #1
2 1686
On Fri, 13 Jul 2007 08:42:17 -0700, Chris Dunaway <du******@gmail .com>
wrote:
What what I have read, Application Scoped settings in the setting file
are read only. Why is this? Is there a good reason for this
restriction?
One good reason is that application-scoped settings are generally things
that should be set or changed only during program installation or by an
administrator.
[...]
What alternatives are available to me to be able to persist
Application Scoped settings?
The "old" mechanism should work fine: create a registry key under
HKEY_LOCAL_MACH INE and store your settings there. You will, of course,
need administrator privileges to do that, which is as it should be (no
regular user should be able to do anything that will affect any other
user).

Pete
Jul 13 '07 #2

I thought Microsoft were going away from using the Registry and instead
just using files. Do you know if this is true - would you recommend
continuing to use the registry?
Nigel
*** Sent via Developersdex http://www.developersdex.com ***
Jul 18 '07 #3

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

Similar topics

2
3077
by: Citoyen du Monde | last post by:
Trying to get some ideas on a simple javascript project (to teach myself the language). I want to develop a client-side vocabulary practice application that would allow users to enter their own words, their own definitions plus an example of how the word is used in practice. It'll be all client side with - cookies? to get persistence so that the words won't disappear on me each time the page is closed (which is what happened when I
3
4929
by: Mirek Endys | last post by:
Hello all, I have this problem. I have a windows service and I would like to put there Settings for starting this service. Because of this service is running under NETWORK_SERVICE account, what is the best way to use settings? Should I create my own settings or can I use classic application settings. Is there way to change this application-scoped settings change programmatically? Thanks.
9
2552
by: Dave Booker | last post by:
When I run a particular application I've been working on for a while, it somehow finds a value for the Application Setting "Test.Properties.Settings.Default.ProjectPath", but I can't see where it is acquiring the value! I have been through all of the project's Properties, and read through every app.config on my entire computer and can't find the value it's getting during runtime. Mysteriously, when I step through the application in...
2
13129
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
338
by: John | last post by:
Hi For my db app, I need to save the location of the db (really a windows path) which normally only needs to be set at the first app start (I can check if the setting is missing and ask user for a value). Occasionally (once in a blue moon) I may need to change this setting in case db is moved to a different server etc. My question is what sort of mechanism can/should I use to store this setting?
3
4787
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,...
6
7524
by: Steve Kershaw | last post by:
I have a problem in which I'm trying to access a method in a .DLL from an ASP.Net web page (written in C#). I keep on getting the error "The current configuration system does not support user-scoped settings". I've done some research into this problem and I've found out that the solution has something to do with the ConfigurationManager.AppSettings for settings, or Profiles for per-user configutation in ASP.Net 2.0. However, I don't know...
0
1081
by: SteveKershaw | last post by:
I have a problem in which I'm trying to access a method in a .DLL from an ASP.Net web page (written in C#). I keep on getting the error "The current configuration system does not support user-scoped settings". Here is my code snippit from the .master.cs file: protected void btnProcessFlatFile_Click(object sender, EventArgs e) { try { PayrollTaxesMaster.PayrollTaxesMasterClass objPayrollTaxesMaster;
2
4039
by: shujaat | last post by:
Hi, I'm working on a Windows Service (C#) and have added a few Application scope settings in it. Since application-scoped setting are read-only, I have manually added "set" functions for each of them in the designer-generated code. Now I can assign value to these settings at run-time and call the Save function without any exceptions, but this doesn't actually save them to the disk file. Whenever my service restarts, i find that it is still...
0
8385
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
8303
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
8821
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...
0
8723
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8502
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
8602
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
4150
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...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1941
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.