Posts Tagged ‘x64’

Am I running as a 32 or 64-bit application?

Here’s an easy way to determine if a .NET application is running as either 32 or 64-bit  application. VB Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)   If IntPtr.Size = 8 Then     Response.Write("64-bit")   ElseIf IntPtr.Size = 4 Then     Response.Write("32-bit")   End If End Sub C# protected void [...]

More »

HttpContext.Current.Request.UserHostAddress returns ::1

One would expect HttpContext.Current.Request.UserHostAddress to return the IP address of the client computer. On my developement machine this would be 127.0.0.1. The application I’m working on acts on this IP address, so it is fital to get the correct address. Since I’ve moved to Windows Server 2008 x64 on my laptop, I got ::1 as a [...]

More »

Could not load file or assembly ‘Name’ or one of its dependencies. An attempt was made to load a program with an incorrect format.

On a 64-bit Windows installation this is caused by the fact that assemblies are compiled for x86 processors only. To change the compile settings do the following: Open the project properties Open the Compile tab Open the Advanced Compile Options… window Change the Target CPU from x86 to AnyCPU Recompile Happy programming!

More »