Reading in config files _one_ way – what’s the path?

Executive summary:  AppDomain.CurrentDomain.SetupInformation.ApplicationBase

Subscribe here: http://feeds.feedburner.com/jeffreypalermo.

In a console app, this directory is where the assemblies are.  In ASP.NET, this directory is where the web.config file is, not the assemblies.  Other methods seem to be less reliable and rely on the current directory.  This can change whether the code is executing stand-alone or through Visual Studio.  the above API seems to be very consistent.

Please share your experiences.