Skip to content

32 bit IIS on a 64 bit machine #9

Description

@dampee

Currently, the check whether we run 32/64 bit is kind of wrong.

You could have a 64 bit machine, while IIS (or IIS Express) can be running in 32-bit. Which will cause an invalid result because we check on the machine: Environment.Is64BitProcess

I would be better if we checked on the current process whether it is 32 or 64 bit?

Looking for a solution, I came across this : https://stackoverflow.com/a/397695/97615

if (IntPtr.Size == 8) 
{
    // 64 bit machine
} 
else if (IntPtr.Size == 4) 
{
    // 32 bit machine
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions