Questions tagged [application-settings]
application-settings are global code or data used for configuration
application-settings
787
questions
653
votes
14
answers
555k
views
How can I save application settings in a Windows Forms application?
What I want to achieve is very simple: I have a Windows Forms (.NET 3.5) application that uses a path for reading information. This path can be modified by the user, by using the options form I ...
227
votes
19
answers
219k
views
Opening the Settings app from another app
Okay, I know that there are many question about it, but they are all from many time ago.
So. I know that it is possible because the Map app does it.
In the Map app if I turn off the localization for ...
158
votes
10
answers
242k
views
How to fix Error: "Could not find schema information for the attribute/element" by creating schema
I have a windows forms application written in VS2010 with C# and get the following errors in the app.config file:
Message 4 Could not find schema information for the attribute 'name'
Message 8 ...
111
votes
4
answers
92k
views
Can a spring boot @RestController be enabled/disabled using properties?
Given a "standard" spring boot application with a @RestController, eg
@RestController
@RequestMapping(value = "foo", produces = "application/json;charset=UTF-8")
public class MyController {
@...
104
votes
2
answers
60k
views
App.config: User vs Application Scope
I have added App.config file in my project.
I have created two settings from Project > Properties > Settings panel -
I have noticed that when I am adding a setting, I can define scope as User or ...
95
votes
13
answers
58k
views
How can I display the application version revision in my application's settings bundle?
I would like to include the application version and internal revision, something like 1.0.1 (r1243), in my application's settings bundle.
The Root.plist file contains a fragment like this...
&...
91
votes
5
answers
52k
views
Which design patterns can be applied to the configuration settings problem?
In large and complex software products managing configurable settings becomes a major pain. Two approaches I've seen to the problem are:
have each component in the system load its own configuration ...
61
votes
3
answers
45k
views
Difference between 'SpecialFolder.LocalApplicationData' and 'SpecialFolder.ApplicationData'?
On my system, %AppData% leads to ApplicationData which is C:\Users\<USER>\AppData\Roaming
But there is also C:\Users\<USER>\AppData\Local
And for some more confusion D:\Users\<USER>\...
56
votes
9
answers
55k
views
Find current country from iPhone device
I have to get the current country in the iPhone settings. Can anyone tell me how to get the current country in iPhone application.
I have to use the current country for parsing the RSS feed in which ...
51
votes
8
answers
55k
views
Accessing another project's settings file
Is there a way to access the settings file from a different project? For example, I have a solution that contains 2 projects (Lets call them Proj1 and Proj2). I want to access the application settings ...
50
votes
5
answers
16k
views
Azure connection string best practices
I have an application that I am just migrating to Azure. Currently I use web.config transformation to manage changing the database connecting string dev/staging/prod environments. How is it best to ...
42
votes
4
answers
10k
views
How do I store desktop application data in a cross platform way for python?
I have a python desktop application that needs to store user data. On Windows, this is usually in %USERPROFILE%\Application Data\AppName\, on OSX it's usually ~/Library/Application Support/AppName/, ...
38
votes
7
answers
32k
views
Opening app's notification settings in the settings app
In the case that a user may accidentally declines to receive notifications and wants to turn notifications later, how can I use an NSURL to open the IOS Settings App to my app's notification page ...
36
votes
3
answers
17k
views
FileNotFoundException in ApplicationSettingsBase
When debugging an application I always get the following error when break on exception is enabled in Visual Studio. This is really bugging me, since we work with break on exception. The funny thing is,...
36
votes
4
answers
24k
views
Ways of keeping configuration code out of logic code using Dependency Injection
How can keep all the configuration file code out of my logic code using Settings (ApplicationSettingsBase) and Dependency Injection?
With configuration I mean a customer specific configuration file.
...
34
votes
4
answers
21k
views
Error: 'Cannot create unknown type '{clr-namespace:NameSpace.Properties}Settings'.'
I define my settings and styles in a ResourceDictionary:
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft....
30
votes
7
answers
47k
views
Reading default application settings in C#
I have a number of application settings (in user scope) for my custom grid control. Most of them are color settings. I have a form where the user can customize these colors and I want to add a button ...
29
votes
4
answers
155k
views
Max value of Xmx and Xms in Eclipse?
My settings for these values in eclipse.ini are:
-Xms768M
-Xmx1024M
When setting them higher, Eclipse doesn't start anymore. Is there a way to increase these values without Eclipse crashing?
28
votes
17
answers
8k
views
Why aren't .NET "application settings" stored in the registry?
Some time back in the nineties, Microsoft introduced the Windows Registry. Applications could store settings in different hives. There were hives for application-wide and user-specific scopes, and ...
28
votes
3
answers
15k
views
Automatically "upgrade" user settings from previous version of app.config file?
Every time I compile my app and the version number changes (I have an auto-incrementing build number), I lose the user-configured app.config settings, since they're stored in the AppData folder for a ...
27
votes
7
answers
10k
views
Why do people consistently recommend using appConfig instead of using Settings files? (.NET)
Very often I see the answer to the question like: "How should I store settings in my .NET app?" is to edit the app.config file by manually adding entries to the app.config (or web.config) like so:
&...
26
votes
6
answers
23k
views
Save little information as setting in android (like first time that app is run)
I want to save a flag for recognizing that my app is run for the first time or not. For this simple job I don't want to create database..
Is there a simple option to do this? I want to save and read ...
26
votes
4
answers
19k
views
How to open settings app programmatically?
I'm using swift with ios 8.3. I want to open settings app from my application. I know that using the code
UIApplication.sharedApplication().openURL(NSURL(...
26
votes
4
answers
34k
views
ConfigurationManager.AppSettings Returns Null In Unit Test Project
I have a C# unit test project with application settings in the app.config file. I am testing a class that exists in a different project. That class depends on both, ConfigurationManager.AppSettings ...
25
votes
1
answer
27k
views
How to create System Apps in android
I want to create an system application(while installing it will ask user permission to make it as system app) for UN-rooted application. As I am not familiar in android, please tell me how to create ...
24
votes
3
answers
7k
views
Visual Studio, Application Settings... rearrange
Silly questions... purely aesthetic... given the picture above. How do you move the values up/down? For example, State belongs grouped with Height/Width/Top/Left (Window Position + state).
Not the ...
24
votes
3
answers
10k
views
How to save byte[] in c# application settings
I am trying to save a byte array (byte[]) in c# application settings that is returned by Object List View.
Can anyone give me a solution on how to save byte array in c# application settings?
or some ...
22
votes
6
answers
25k
views
How to retrieve values from settings.bundle in Objective-c/Swift?
I have created a project that set and retrieve values from settings.bundle. I have also set some defaults values in settings.bundle file. Now the problem is when I retrieve values as
NSUserDefaults *...
22
votes
6
answers
12k
views
Why are my application settings not getting persisted?
So I have some settings that are of the user scope, but for some reason, they are not being saved to the .exe.config file. I do the following:
Properties.Settings.Default.Email = "[email protected]";
...
19
votes
5
answers
12k
views
How to use applicationSettings in the new web.config configuration in VS2010?
I'm used to use web deployment projects. Currently I am developing a new web application with VS2010 and want to try to get along with the new web.config principle and deployment issues.
How can I ...
19
votes
2
answers
18k
views
Access application settings from ASP.Net MVC View
In an ASP.Net MVC 1.0 applicati0n, is it possible to access the application settings (MyProject.Properties.Settings.Default.*) from inside my View (aspx page)?
I've tried but the intellisense and ...
19
votes
5
answers
35k
views
How to store a list of objects in application settings
I have recently became familiar with C# application settings, and it seems cool.
I was searching for a way to store a list of custom objects, but I couldn't find a way!
Actually I saw a post to store ...
19
votes
1
answer
19k
views
React-Native: save user preferences
Native developers,
I really searched a lot but couldn't find anything that fits my needs.
I am new to react native and have a question.
I wonder how I can save user preferences of my app.
For ...
18
votes
7
answers
84k
views
WRITE_SECURE_SETTINGS permission error even when added in Manifest
I have added "android.permission.WRITE_SECURE_SETTINGS" in the Manifest. But still i get an error message saying - required "WRITE_SECURE_SETTINGS".
I have seen a lot of talks about this, and that ...
18
votes
2
answers
16k
views
Notepad++ Keyboard Language just Changed
Notepad++ suddenly changed its keyboard settings, which now means it thinks I use a English keyboard, although I have a Nowegian keyboard.
To this end, for instance shift + 2 becomes @, as opposed ...
18
votes
1
answer
25k
views
Store String Array with Values in Application Settings [duplicate]
I've modified my Settings.settings file in order to have system_Filters be a System.String[].
I would like to populate this variable within the Visual Studio designer and not from within the code. I ...
17
votes
4
answers
14k
views
Get Connection String in Azure Function v3
I am very confused. I want to get a connection string in an Azure v3 function (.Net Core 3.1).
My local settings looks like
{
"IsEncrypted": false,
"Values": {
&...
16
votes
3
answers
30k
views
Unable to access ConfigurationManager.AppSettings in a Windows Forms Application
How can I access ConfigurationManager.AppSettings in my Windows Forms Application?
The error message reads: The name 'ConfigurationManager' does not exist in the current context.
16
votes
5
answers
12k
views
Application settings error after changing target framework of project
In my application I am using user settings as explained here.
Then I realized that in VS 2010 I was using .NET 4.0 while only .NET 2.0 was sufficient.
When I changed the framework and build the ...
16
votes
2
answers
9k
views
User Settings vs Application Settings vs Resources in Visual Studio 2008
I'm a little confused by the different ways Visual Studio allows dynamic values to be saved to a project, and how they are intended to be used.
I understand that if I need to include binary ...
16
votes
2
answers
8k
views
How to create Apps in android which can't be uninstalled? Can we make System apps?
We are providing one default app for our customers with android phone. Which user can not be uninstall. I have used Device Admin feature from this example But user can delete app by deactivate from ...
14
votes
3
answers
27k
views
How do I retrieve ApplicationSettings from a loaded App.config file?
Is it possible to access the values from the applicationSettings section of a loaded app.config file?
I have found an example How do I retrieve appSettings, but I can't find out how to access ...
14
votes
4
answers
18k
views
Default size of results window SQL Server Management Studio or alternative
Any one who uses SQL Server 2008, or earlier variants, knows that when you run the commands in the window the results window pops up for the lower half of the screen. I do want to see my results but ...
14
votes
1
answer
19k
views
app.config globalization
web.config allow a globalization tag:
This setting will set the globalization for the entire ASP.NET application.
Does this tag work in app.config in standard forms applications too?
If yes... ...
13
votes
3
answers
14k
views
C# - User Settings broken
We had a rare exception occur when reading the standard .Net user settings (this are the ones found in "project properties" in VS 2008):
System.Configuration.ConfigurationErrorsException was caught
...
13
votes
1
answer
21k
views
Changing NHibernate Session.Save command timeout
We have a couple of long running back-end processes that take longer than the default 30 seconds.
Our NHibernate version is 2.0.1.4000 and Spring.NET is 1.2.0.20313.
NHibernate is configured through ...
13
votes
1
answer
3k
views
Asp.Net Core 3.1 Appsettings not respecting JsonConverter
In asp.net core 3.1, using the new System.Text.Json, I am trying to use a custom JsonConverter on an appsettings section. Manually serializing/deserializing respects the converter just fine, but ...
13
votes
2
answers
22k
views
Android - Push Notification are ON?
How to check programmatically if user turn off push notification in app settings?
Can I open app settings intent directly from the app to prompt user to turn it on?
Thanks
12
votes
4
answers
33k
views
SQL Server Management Studio -- where is Tools/Import and Export settings menu?
In Visual Studio, there is an Import and Export settings wizard which you can use to customize Visual Studio and save settings to a .settings file.
Do we have something like it in SQL Server ...
12
votes
2
answers
10k
views
Xamarin Forms Sharedpreferences cross
I'd like to know what is the best solution to manipulate application settings in a cross-platform way.
In iOS we can change the settings outside the app in the settings screen, but we don't have that ...