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.

Reply via email to