Which machine.config file is my solution used on the server?

I have an asp.net application that needs some editing of the machine.config file to work properly. On my development machine (running windows xp), I edited the machine.config file at this location: "C: \ WINDOWS \ Microsoft.NET \ Framework \ v2.0.50727"

This is a line of modified code, with changes (adding user / password):

<processModel autoConfig="true" userName="SYSTEM" password="AutoGenerate">

On the server (when starting Windows Server 2003), I made the same changes to the same file in the same place. However, when I debug the solution, it does not work properly (nothing happens, and from time to time, the same problem that I have on my development machine, before making these changes to the configuration file).

I came to the conclusion that my application does not use the machine.config file in the same place on both my computer and the server. To confirm this, I added random numbers to the end of the username and password in both configuration files. On my machine, the application does not even start after that. On the server, it starts and is called in the same way as random numbers.

My question, in short, is how to find out which machine.config file is actually used by the server and / or how can it use it in the specified location?

+5
source share
1 answer

Perhaps your server is a 64-bit server, which means that it will be located in:

C: \ WINDOWS \ Microsoft.NET \ Framework64 \ v2.0.50727

64- machine.config. :

  • ASP.NET 1.x %WINDIR%\Microsoft.NET\Framework\v1.1.4322
  • ASP.NET 2.0/3.5 x86 %WINDIR%\Microsoft.NET\Framework\v2.0.50727
  • ASP.NET 2.0/3.5 x64 %WINDIR%\Microsoft.NET\Framework64\v2.0.50727
  • ASP.NET 4.0/4.5.x x86 %WINDIR%\Microsoft.NET\Framework\v4.0.30319
  • ASP.NET 4.0/4.5.x x64 %WINDIR%\Microsoft.NET\Framework64\v4.0.30319
  • ASP.NET 5.0 CLR , ASP.NET 4.0, .NET Framework 4.6 - 4.5. ASP.NET 5.0 CoreCLR, machine.config.

ASP.NET, , ASP.NET(IIS 6) AppPool (IIS 7 +)

x64 vs. x86 W3SVC/AppPools/Enable32BitAppOnWin64 IIS 6 AppPool IIS 7.

+12

All Articles