Connection Strings

Connection Strings

Old forum URL: forums.lhotka.net/forums/t/3047.aspx


culprit posted on Monday, June 18, 2007

I am just trying to understand where and when I should set the Connection Strings. I notice in the Project Tracker application that the connection strings are retrieved from a module using the ConfigurationManager classes. There is no settings declared in the Library so does this mean that it automatically uses whatever app.config file in finds in its directory to load these settings. Sorry to be ignorant here but I just dont quite understand how the settings in the config file in the WIN interface end up being loaded into the library DLL. Would someone mind explaining this to me?

Sincere Thanks,

Rob

RockfordLhotka replied on Monday, June 18, 2007

.NET loads settings at the AppDomain level - so basically one config file per running program instance. That config file is global to all assemblies (EXE, DLLs) running in that AppDomain. To get at these settings, you use System.Configuration.

Copyright (c) Marimer LLC