on x64 Windows 7 I am trying to get hello world MVC 3 website running as 64-bit process (so Environment.Is64BitProcess returns true on a page) using IIS Express 8 latest beta.
IIS Express 7.5 is 32 bit but IIS Express 8 does support 64 bit (http://learn.iis.net/page.aspx/1266/iis-80-express-beta-readme/).
Can't get any 64-bit love.
Building AnyCpu returns Is64BitProcess false, building x64 gives "An attempt was made to load a program with an incorrect format. " as if it was trying to run as 32-bit process.
Experiments w/ renaming folders etc. suggest that "C:\Program Files (x86)\IIS Express" is only thing that is getting used, and "C:\Program Files\IIS Express" is being ignored by VS.
How can I get VS to use the x64 IIS Express host?
An important difference is the way worker processes are managed. In IIS, the Windows Process Activation Service (WAS) silently activates and deactivates Web applications and the user has no direct control. In IIS Express, there is no WAS and the user has full control of application activation and deactivation.
The 32 bit version can be found at c:\program files (x86)\IIS Express\iisexpress.exe and the 64 bit version can be found at c:\program files\IIS Express\iisexpress.exe . IIS Express ignores the enable32BitAppOnWin64 attribute. To run the app pool as 32 bit, you must execute the 32 bit version of IIS Express.
Configure IIS express on visual studioSelect the web application project and open properties -> select the web tab -> under server's select IIS express-> Specify the project URL. Now open the project folder and . vs folder (Hidden) -> Config -> applicationhost.
This option is now part of Vs 2013 / 2015 / 2017:
Tools | Options | Projects and Solutions | Web Projects | Use the 64 bit version of IIS Express
From a Microsoft response to forum post on http://visualstudio.uservoice.com -
This is working for me even though it is not endorsed or supported officially by Microsoft.
Mike Harder (Microsoft) commented · January 31, 2013 5:26 p.m.
You can configure Visual Studio 2012 to use IIS Express 64-bit by setting the following registry key:
reg add HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\WebProjects /v Use64BitIISExpress /t REG_DWORD /d 1
However, this feature is not supported and has not been fully tested by Microsoft. Improved support for IIS Express 64-bit is under consideration for the next release of Visual Studio.
Allow for IIS Express 64 bit to run from Visual Studio 2012
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With