I want to apply a change so That I can use Server GC settings for my C# 3.5 app - I can do that by editing the machine.config
file.
The only problem is I do not know where that is.
How can I find the path of this file in a repeatable way across a number of different machines
32-bit
64-bit
[version]
should be equal tov1.0.3705
,v1.1.4322
,v2.0.50727
orv4.0.30319
.v3.0
andv3.5
just contain additional assemblies tov2.0.50727
so there should be noconfig\machine.config
.v4.5.x
andv4.6.x
are stored insidev4.0.30319
.You can run this in powershell:
Which outputs this for .net 4:
Note however that this might change depending on whether .net is running as 32 or 64 bit which will result in
\Framework\
or\Framework64\
respectively.In your asp.net app use this
In order to be absolutely sure, slap a Label on an ASP.NET page and run this code:
I believe this will leave no doubt!
It semi-depends though... mine is:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG
and
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\CONFIG