settings

How should I store public settings? (.NET)

I'm using the application-scoped settings to store settings that cannot change at run-time. I'm using the user-scoped settings to let individual users configure their preferences. But how should I store/control settings that are modifiable at run-time by an admin-level user that are application wide (i.e., they impact all of the PC's u...

What is the best way to persist PHP application setings?

I have a small application that I'm developing, that I may want to give/sell to others. I want to persist some settings, and create an admin interface to modify them. What would be the best way to store them away? A DB table seems like overkill for the 10-20 settings I'll have, and I want the retrieval of these settings to be as fast ...

Visual Studio 2008 (C# @ Verbatim) Fonts and Colors option

I just read secretGeek's fun post on 8 ways to be a better programmer in 6 minutes and really liked the tip on making hard-coded strings look ugly. When I tried to change the Fonts and Colors setting to do this in my copy of Visual Studio 2008 Professional, I found that the String (C# @ Verbatim) option was not in the Display items list...

Best-Practices : how should I store settings in C# (Format/Type) ?

Now I'm curious what are possibilities to store/load settings in .net. For example I need to store user name/password for different db's and etc.., also I need to store some options and etc. My though was to create [Seriazable] class and save it to file... What can You suggest? what are possibilities in .net and etc. ...

why can't i change my regional settings?

for about 2 hours i've been trying to find solutions on how to change my advanced regional settings(the one for language used in non-unicode programs) ..because everytime i try to change the language ...the system gives me an error that says: Setup was unable to install the chosen locale. Please contact your system Administrator. So wha...

Clickonce Upgrade and application setting

We have a winform application deplyed using Clickonce which has a configuration file. What we need is when there is an upgrade available, to merge the configuration in local machine with what is coming from the deplyoment. Any ideas or experiences? ...

Saving an ArrayList of custom objects to user settings

Is it possible to save an ArrayList of custom objects to the application user settings without resorting to custom serialization? For example, given a basic data class containing only public get/set properties and private backing fields: [Serializable] class SimpleClass() { ... } When I run the following in code, and then rest...

How to preserve project settings between program executions?

In my application I allow user to choose a file with some data, data is read and it should be available when user closes and opens the application again. I thought that one could store the value in Settings so I wrote a class: public static class SettingsManager { public static string ComplexValidationsString { ...

Using Settings with Complex Types

I am using the Settings class in my .NET project. I notice in the editor that only certain types are available to be used as types for the individual properties in the Settings class. What if I wanted to have a property that was an enumeration from my code or a generic collection for instance? How would I implement that? I'm guessing ...

Why do Settings.settings files dump all their values into the app.config?

Why do Settings.settings files dump all their values into the app.config? Its not that much of a big problem, however, my application is getting larger and I think grouping them into separate files would help me organise things better. I was thinking of just creating multiple settings files, which is fine, but app.config is blowing up m...

Settings Editor for #develop?

Using Visual C# Express, if I double-click on the Properties/Settings.settings file, I automagically got a special settings editor. Doing the same under #develop just results in a standard editor, and it looks like Settings.Designer.cs doesn't get updated, so that has to be updated by hand as well. Is there a plug-in for #develop that ...

.NET 2.0 Application Settings (user.config) file location

Hi, I'm trying to customize the location of user.config file. Currently it's stored in %AppData%\[CompanyName]\[ExeName]_Url_[some_hash]\[Version]\ I want to it be something like %AppData%\[CompanyName]\[ProductName]\ so there's no version number and no hash stuff. First question: can this be done and how? What are the implicati...

How to write to the main exe's .config userSettings section?

Is there any supported API in .NET 2.0 for writing to the userSettings section of the main exe's .config file? The scenario is: Winforms 2.0 application. I have a setting (a database connection string, if you need to know) that has user level scope. This means that each user has a user.config file created by .net when the user saves t...

Should I persist this application data?

I have a class in my application that translates path tokens into fully qualified paths. For example: it can take a string like "%MYAPPDATA%" and return C:\Users\user.DOMAIN\AppData\Raoming\MyApp. Alternatively, the class has an overload to the function that can take an enum instead of a string. For example: it can take the enum App...

.NET MVC - Global Settings Class - which of these methods is best:

OK so im trying to create a settings class to store certain strings that i need to access throughout the system. I have created a globalSettings.cs with the code below: public class GlobalSettings { private readonly Hashtable myHT; public GlobalSettings() { //Hashtable used to store global strings myHT = new...

C# Settings xml file location

I have a project that reads in a file based on a value in a C# Setting class. This value however changes from machine to machine and Id rather not ask the user the first time the program is run as its a corporate environment, instead Id like it to be set in the installer, but where is the file located? Is there an easier method? This is...

How to use settings in Visual C#

I have been a VB.net developer for a long time and changed recently to C#. When I was using VB.net, to call user settings, I just need to create a new setting using the designer and then call it from code with the My namespace. Here's the code My.settings.anysetting I can change or get data from it. However in C# the My keyword doesn't w...

Is there any way to dump Internet Explorer settings to a textfile?

Topic says it all. Some stuff aren't working on some of my clients' browsers, and we have narrowed it down to an IE-error, but it would be GREAT to have a way of easily comparing IE's settings. Anyone got an idea? ...

Change the taskbar settings programmatically?

I want to change the settings of my taskbar with a small batch file or java programm or whatever. So I want to know, if there is a registry key containg this information. Does anybody knows, where Windows sets taskbar settings? Edit: No, I don't want to annoy the users with changing taskbar settings on every boot. ...

What is the best way to manage settings (configuration) in ASP.NET 2.0?

I have a project for which we are extending some functionality from an existing client into a web portal in ASP.NET 2.0. The client is windows forms based (in .NET 2.0). It has some settings that are kept in the Project > Properties > Settings.settings system, including a generated settings.Designer.cs file. This file provides nice autom...