473,385 Members | 1,769 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,385 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 2531

"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" />...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...

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.