Skip to main content
Filter by
Sorted by
Tagged with
215 votes
18 answers
747k views

I'm not able to access values in configuration file. Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); var clientsFilePath = config.AppSettings.Settings["...
Matt's user avatar
  • 9,052
106 votes
10 answers
288k views

It might sound too trival to ask and I do the same thing as suggested in articles, yet it doesn't work as expected. Hope someone can point me to the right direction. I would like to save the ...
Houman's user avatar
  • 66.6k
38 votes
4 answers
69k views

I have added multiple app.config (each with a differet name) files to a project, and set them to copy to the output directory on each build. I try and access the contents of each file using this: ...
user9659's user avatar
  • 901
8 votes
4 answers
31k views

I'm writing a test WinForms / C# / .NET 3.5 application for the system we're developing and we fell in the need to switch between .config files at runtime, but this is turning out to be a nightmare. ...
born to hula's user avatar
  • 1,306
14 votes
3 answers
4k views

I'm trying to unit test a custom ConfigurationSection I've written, and I'd like to load some arbitrary configuration XML into a System.Configuration.Configuration for each test (rather than put the ...
Matt's user avatar
  • 32.4k
76 votes
14 answers
31k views

I'm in the process of weeding out all hardcoded values in a Java library and was wondering what framework would be the best (in terms of zero- or close-to-zero configuration) to handle run-time ...
57 votes
9 answers
91k views

In a VS2005 C# project I have added a reference to System.configuration. In the object browser, I can see the System.Configuration.ConfigurationManager. In Intellisense System.Configuration only has ...
kpollock's user avatar
  • 3,999
13 votes
3 answers
35k views

I have a console application which has its own App.config. I need to change some values in section time to time. My problem is, when I execute the exe within the bin/debug folder it gets the ...
pencilCake's user avatar
  • 53.8k
77 votes
3 answers
35k views

I'm wondering how the ConfigurationManager.AppSettings[Key] works. Does it read from the physical file each time I need a key? If so, should I be reading all the app settings of my web.config in a ...
The Light's user avatar
  • 27.2k
23 votes
4 answers
43k views

I am trying to retrieve values from my App.config file which is stored in my working directory, however when I run the program it returns null. I am very confused why this is so, and have looked over ...
TheBoss's user avatar
  • 2,084
12 votes
1 answer
26k views

Here in my project I have two application configuration files called app.config and accessLevel.config. Now using the OpenExeConfiguration I was able to access the app.config.exe file but not the ...
Praveen's user avatar
  • 56.7k
10 votes
1 answer
7k views

I have a program A, it also have an app.config file where I have added some keys like server address, username and password for connecting to a server. It is a console application. Now I want to make ...
akif's user avatar
  • 12.4k
8 votes
2 answers
5k views

I've used these two configuration files many times before, but I've never taken the time to fully understand how they really work. As most people do, I understand the basics in how to call ...
John B's user avatar
  • 20.5k
35 votes
8 answers
92k views

I've got a reference to System.Configuration - and ConfigurationSettings is found no problem - but the type or namespace 'ConfigurationManager' could not be found!? I've read around - and it looks ...
user avatar
17 votes
2 answers
27k views

I'm using Microsoft Visual Studio Team System 2008 Team Suite. The "Configuration Manager" menu item is missing for me. I've assigned a keyboard shortcut to the Configuration Manager, but it doesn't ...
13 votes
1 answer
4k views

I have an Web.Api application that uses functions from a different assembly. For this assembly I have created a .config file where I store some strings. I am using the following code which should ...
Peter Larsson's user avatar
12 votes
2 answers
14k views

I had some trouble on a test server with an ASP.NET website. I goofed, and had the home directory of the Default Web Site pointed to the wrong place. When I tried: ConfigurationManager....
David Hodgson's user avatar
9 votes
2 answers
9k views

Background: I have some data thats stored in the web.config files of about 100 web applications. This data is getting moved to a database gradually. The webpages will show the web.config data until ...
Steve's a D's user avatar
  • 3,821
3 votes
1 answer
7k views

Where is the SQL Server Configuration Manager in SQL Server 2016? It is not under the menu group for SQL Server 2016. (I have the Developer Edition installed)
Charles Okwuagwu's user avatar
1 vote
1 answer
4k views

gleanings from a variety of sources (including stackOverlflow), however when I come to use it, I get the following error message "The Configuration property 'deviceconfig' may not be derived from ...
Paul Johnson's user avatar
70 votes
4 answers
101k views

I have included the following statement in my Visual C# Console Application (Visual Studio 2005 .NET 2.0 Framework) using System.Configuration; and I am using the following statement in my ...
zack's user avatar
  • 7,435
20 votes
5 answers
11k views

My question is about working with standard .NET configuration objects and custom configuration elements as well, (which one can define by extending the System.Configuration.ConfigurationSection class)....
stackh34p's user avatar
  • 9,029
11 votes
4 answers
10k views

I have a small ASP.NET web application hosted in an integration test (executing within NUnit). My product code can usually find configuration data from the web.config or app.config file, but for some ...
Andrew Arnott's user avatar
9 votes
4 answers
8k views

I'm using C# .NET 2.0 Windows Application. and I'm using app.config for my Application Settings. but change in AppSettings doesn't reflected runtime, it Needs Application to be restarted. How can I ...
shahjapan's user avatar
  • 14.6k
8 votes
4 answers
27k views

I am using Visual Studio 2013 with .NET Framework 4.5. I have included the System.Configuration as a reference in the project. I have also included a using statement in the class as such: using ...
sagesky36's user avatar
  • 4,732