32 and 64-bit ASP.NET deployments

Is ASP.NET/C# code an agnostic developed in its essence 32/64 bit, because it is compiled into some intermediate language? The reason I'm asking is because I compile my ASP.NET application on an x64 laptop and then deploy it on the x32 server. No problem. In addition, I do not see any options between the 32 and 64-bit build in VS2010.

+4
source share
2 answers

You can compile the code

  • AnyCPU - runs in 32-bit version of 32-bit version and 64-bit in 64-bit mode
  • x86 - force 32 bit
  • x64 - force execution on 64-bit (will not work on 32-bit OS)
  • (IA64 - Itanumim)

If you compile for AnyCPU, you are in good shape, and most often you will use the goal of the AnyCPU platform. (Build -> Configuration Manager in Visual Studio)

When compiling .Net code, it is compiled into intermediate language code (MSIL), which, in turn, is compiled into native code at runtime using the .Net framework / runtime environment.

+4
source

There are some third-party libraries that can only work as x86.

The best approach would be to ensure that your local environment (Local IIS) is as close as possible to the settings of your target web server. Therefore, if your target IIS only works as 32 bits, set the force 32 bit property of the application pool on your local IIS to true.

0
source

Source: https://habr.com/ru/post/1333914/


All Articles