My task is simple: I need to test my ASP.NET web application in a 64-bit environment on my development machine. (At this point I don't even ask about running it through a debugger. All I need is to run it in a 64-bit process.)
So I created a stock C# Web Application in Visual Studio 2010 and adjusted its properties as such:
I then did Ctrl+F5 (or run without debugging) and IE loaded up and hangs up like so:
What am I doing wrong here?
PS. Running it on Windows 7 Ultimate (64-bit).
We had the same problem and when the team jumped to Visual Studio 2012, this registry key was really useful to us :
you can add a registry key to force visual studio to use the 64 bits version of iisexpress.exe ; unfortunately for you, it is a VS2012-only solution.
reg add HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\WebProjects
/v Use64BitIISExpress /t REG_DWORD /d 1
Then restart Visual Studio and tick [X] Use IIS Express in your settings.
(see also the source).
UPDATE: For reference, in Visual 2013, this option can be found in the interface : Options/Projects and Solutions/Web Projects/Use the 64 bit version of IIS Express for web sites and projects
In IIS make sure the Application Pool, Advance Settings, Enable 32-Bit Applications = false
If this setting is true then the worker process will run as 32bit WOW64 process.
Chris
No settings required in project or solution level. I am developing WebApp on VS2010 on 32 bit and 64-bit machines simultaneously. Actually We are working on SVN and our few machines have Win7 32-bit and my few mates have Win7-64bit laptops. But there we haven't faced any such issue while compiling the app on two different machines and Even on the live server, it runs butter smooth. Hardly care about the bit and bytes.
To verify a test run. Publish your code and host in your local IIS or Cassini Webserver and access it over LAN.
Also if possible revert back solution and project settings to its original configuration settings. Generally, We do not need to change target until and unless it is strictly required. As, AFAIK, It compiles the assembly under "Any CPU" as target, which is eligible for all i.e. IA, X64 and X86..
Finally, if you are coming across any error, please do post it here. It will help you and us as well.
First of all how to do you know if your IIS process is running your website as 32-bit or 64-bit as of now?
Open Task manager to check the bitness of w3wp.exe. If your machine is 64-bit then IIS will run 64-bit by default. Your problem seems to be something else. If bitness is the issue then you won't even come this far. Check IIS logs (c:\inetpub\logs{website-ID}{date})... that might give you some pointers. If there is nothing in there, check event viewer. If nothing then check if the virtual directory is actually created in IIS Manager under Default Web Site.
Have you actually tested if IIS (sans ASPX) is functional? http:// localhost ? does that work? if that is working then I would recommend checking if your ASP.NET modules are properly installed within IIS.
Hope this Helps.