Link to home
Start Free TrialLog in
Avatar of SkipFire
SkipFire

asked on

machine.config

I understand that I will have multiple machine.config files on a machine, 1 per framework version.  This brings me to a few questions.

1) Is there a single config file somewhere that I can put common entries in?  Specifically I am looking at a readonly connection string for a database that virtually every application we have needs.  We have console apps, windows services, and web applications in 1.1, 2.0, 3.5, and 4.0.

2) If I have a .NET 2.0 DLL called from a .NET 4.0 web application, which machine.config will the .NET 2.0 DLL be reading from?

3) How does 64-bit frameworks work into this?  If I have a 64-bit 4.0 app calling a 32-bit 2.0 DLL, which config file would the 32-bit 2.0 DLL read from?

Rhetorical: Why couldn't they just name them framework.config and then have 1 common machine.config?

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of wls3
wls3
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SkipFire
SkipFire

ASKER

After taking the time and setting up all the tests I found that the only thing that seems to matter is the version of the origination object, after that everything uses that config file.  So if you run a web application that is a 64-bit 4.0 DLL, my observations show that the .NET 64-bit 4.0 machine.config is read by all downstream DLLs.