473,440 Members | 1,755 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,440 software developers and data experts.

System.Configuration.ConfigurationManager.AppSetti ngs

Hi there

is there any way to tell what .config file the property
System.Configuration.ConfigurationManager.AppSetti ngs is trying to access?

I have a class which uses this property but no appSettings are being loaded,
so I am guessing it is trying to access a different config file than I think
it is.

Thanks,
Peter
Nov 10 '06 #1
2 2533

"Peter Kirk" <pk@alpha-solutions.dkskrev i en meddelelse
news:%2****************@TK2MSFTNGP04.phx.gbl...
Hi there

is there any way to tell what .config file the property
System.Configuration.ConfigurationManager.AppSetti ngs is trying to access?

I have a class which uses this property but no appSettings are being
loaded, so I am guessing it is trying to access a different config file
than I think it is.
Hi again
while I didn't find out how to get the name of the current file AppSettings
accesses, I did find out what I was doing wrong. A case of RTFM.
Nov 10 '06 #2
Hello Peter,

It use that config which belongs to your host process (generaly your exe)

Did u try the MSDN sample of using ConfigurationManager.AppSettings ?

PK"Peter Kirk" <pk@alpha-solutions.dkskrev i en meddelelse
PKnews:%2****************@TK2MSFTNGP04.phx.gbl...
PK>
>Hi there

is there any way to tell what .config file the property
System.Configuration.ConfigurationManager.AppSett ings is trying to
access?

I have a class which uses this property but no appSettings are being
loaded, so I am guessing it is trying to access a different config
file than I think it is.
PKHi again
PKwhile I didn't find out how to get the name of the current file
PKAppSettings
PKaccesses, I did find out what I was doing wrong. A case of RTFM.
---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Nov 10 '06 #3

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

Similar topics

2
by: Alan T | last post by:
I have created a class library called Employee.dll and created a configuration file called Convert.config in this project. What should I use to open this config file: <?xml version="1.0"...
8
by: Alberto | last post by:
Can you tell me how to read and modify a value in the app.config file using this class? Thank you very much
6
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...
3
by: Jyothi Kumar | last post by:
Hi, my project is a migrated project from VS 2003 to VS 2005, in this project I used System.Configuration.ConfigurationSettings.AppSettings, now in VS 2005 it is giving a warning Message like:...
2
by: Randy Smith | last post by:
Hi ALL, I am getting this strange warning message, and I can't seem to find any solution for it. 'System.Configuration.CofigurationSettings.AppSettings is obsolete: it has been replaced by...
2
by: mark4asp | last post by:
In trying to get the C# conversion code for Head First Design Patterns to work I came accross a number of warnings. e.g. Warning Number: 10 Description: ...
1
by: =?Utf-8?B?Vmlua2k=?= | last post by:
I keep getting this warining in my code, but when i tried to look at the intellisense after system.configuration. , I couldn't find configurationManager but when i forced to put...
2
by: pantagruel | last post by:
Hi, I have a Visual studio 2005 project that runs as a Windows Service. In it I have declared that I am using System.Configuration. I have set one application setting for the service using the...
2
by: Thomas Bauer | last post by:
Hello, I have a config file. <?xml version="1.0" encoding="utf-8"?> <configuration> <appSettings> <add key="Directory" value="C:\_Database\" /> <add key="CloseApplication" value="0" />...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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
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...
1
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...
0
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.