C# - using .config files with DLLs used by a web app
Posted on 2005-03-17
Hey, I have a solution that includes multiple class library projects, and a web project.
One of my class library projects contains database connections, so I wanted to use a .config file to define the user, database, etc. But i'm not so sure how to do this with a DLL.
I basically want something like a .ini file in VB6, so I don't have to include it in the project, and I can have a different file for each server, and the solution doesn't need to be rebuilt if the file is changed.
I tried adding a .config through the IDE (VS.NET 2003), but it doesn't work when I run a sample ASPX page that uses the DLL. I also tried adding <myAppName>.config and <myAppName>.dll.config to the folder that contains the DLL.
thanks in advance.