Adam,

I was trying the same thing and someone suggested me to go for a more
generic way. I am using
System.Configuration.configurationSettings.AppSettings.Item(). In this
case we don't need to specify the config file. But I am not sure this is
the write way or not(If we have different config files in different
folders). In such cases I don't know how it works...

Mike,
The class which I was writing was almost similar to the one which you
mentioned as 
"[1] http://staff.develop.com/woodring/dotnet/#ConfigFileReader";. But I
have a  question for that class, how can I use that class for an ASP.NET
application's Web.config file? what is the path i need to give? or can I
give just "Web.config" as the argument. I may be wrong, in that case
please correct me...


Madhu.


-----Original Message-----
From: Sills, Adam [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 22, 2002 4:04 PM
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] config files


I have a class that does the exact same thing and you don't need to
specify
the config file. The executing application will be able to find its
config
file automatically with
System.Configuration.ConfigurationSettings.GetConfig (or .AppSettings)
and
it'll get the appropriate config file.

Adam..

-----Original Message-----
From: madhu c. [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 22, 2002 3:34 PM
To: [EMAIL PROTECTED]
Subject: [DOTNET] config files


Hi,

I am writing a component to get/handle all the configuration settings
from
the config files. I created a new component and its having method to
which I
have to pass the name of the config file. For non-ASP.NET applications,
I
know I can pass the name of the config file(which is nothing but the
"name
of the  assembly.config"). For ASP.NET application, if I pass web.config
as
the name of the config file, it fails to get that file because it could
not
get web.config from the path and I am getting FileNotFoundException
saying
that "\winnt\system32\web.config" doesn't exist. Why is it cheking over
there? So if need to use web.config, what should be the path I need to
give
for web.config

You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to