Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to determine 32 bit vs. 64 bit ASP.NET being used?

Tags:

asp.net

I have an ASP.NET server that I do not have direct access to. How can I write a .NET application that will programmatically determine whether ASP.NET is running 32 bit vs. 64 bit?

like image 895
RationalGeek Avatar asked Sep 10 '09 19:09

RationalGeek


2 Answers

Already answered here:

How do I tell if my application is running as a 32-bit or 64-bit application?

like image 66
Badaro Avatar answered Sep 27 '22 21:09

Badaro


The easiest way is to do this:

Int32 addressWidth = IntPtr.Size * 8;

since IntPtr.Size is 4 bytes on 32-bit architecture and 8 bytes on 64-bit architecture.

like image 40
Andrew Hare Avatar answered Sep 27 '22 22:09

Andrew Hare