K
kalyankp78
Hi,
I have a question about config files. I have the following in my
application..
1. ASP.NET web application with a web.config
2. C# class library (BL and DAL) with an App.config
3. Two windows Console Applications with their own App.Config.
Now I try to retrieve a value in the DAL using this code.
string str = ConfigurationSettings.AppSettings.Get("Value");
This code works fine when the windows applications are running. But
when the Webapplication is running and invokes an method in the Data
Access layer, the piece of code tries to refer to the Web.Config
instead of its own app.config even though it is in the DAL. Is there
any code that will tell DAL to refer to its own config file?
Can anyone tell me if I can do what i trying to do and if yes what
changes do I need to make to my code for it to work?.
I do need the app.config at the DAL level as there are some settings
common to both the windows as well as web application and that is the
best place to put it.
Help Please,
Thanks Kalyan
I have a question about config files. I have the following in my
application..
1. ASP.NET web application with a web.config
2. C# class library (BL and DAL) with an App.config
3. Two windows Console Applications with their own App.Config.
Now I try to retrieve a value in the DAL using this code.
string str = ConfigurationSettings.AppSettings.Get("Value");
This code works fine when the windows applications are running. But
when the Webapplication is running and invokes an method in the Data
Access layer, the piece of code tries to refer to the Web.Config
instead of its own app.config even though it is in the DAL. Is there
any code that will tell DAL to refer to its own config file?
Can anyone tell me if I can do what i trying to do and if yes what
changes do I need to make to my code for it to work?.
I do need the app.config at the DAL level as there are some settings
common to both the windows as well as web application and that is the
best place to put it.
Help Please,
Thanks Kalyan