Can't get IIS Express 8 beta to run website as

2019-01-04 23:50发布

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?

10条回答
甜甜的少女心
2楼-- · 2019-01-05 00:24

In the registry, go to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\IISExpress\8.0\InstallPath and change the path to the 64-bit iisexpress.exe location.

查看更多
Animai°情兽
3楼-- · 2019-01-05 00:28

Late to the party but VS2013 has this in the Options.

Tools -> Options -> Projects and Solutions -> Web Projects -> Use the 64 bit version of IIS Express…

查看更多
爱情/是我丢掉的垃圾
4楼-- · 2019-01-05 00:31

Simple possibility is just to set IIS x64 as starting program for the WEB project :

Project Properties -> Web -> Start Action - > Start Program : c:\Program Files\IIS Express\iisexpress.exe command arguments: /path:{yourProjectPath} /port:{yourPort}

查看更多
可以哭但决不认输i
5楼-- · 2019-01-05 00:32

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

查看更多
狗以群分
6楼-- · 2019-01-05 00:32

In order to solve this on my system, I cheated -- I copied the 64-bit executables (in \Program Files\IIS Express\) over the 32-bit executables (in \Program Files (x86)\IIS Express\). Visual Studio doesn't seem to care whether it's one or the other.

I guess we will have to wait and see if the final release of VS 2012 will allow for choosing between the 32-bit and 64-bit IIS Express.

查看更多
Explosion°爆炸
7楼-- · 2019-01-05 00:40

Do the following to run VS2012 project in x64 project in IIS8 Express on x64. I am running x64 WCF service. See below,

  • Install x64 version of IIS Express 8.

  • Set the project to run x64 bit.

enter image description here

  • Add a custom web server url. Because you don't want to start the service when the project run (F5).

enter image description here - Write a bat file and add the following. Put the correct unc location of the applicationhost.config and the correct project name. Save the bat file.

cd "Program Files"/IIS Express 
iisexpress.exe  /config:"\\companyname.com\root\User-Profiles\testusername\Documents\IISExpress\config\applicationhost.config" /site:"YourProjectName.WcfHost" /apppool:"Clr4IntegratedAppPool"
  • Run (F5) the project.
  • Double click the bat file to start IIS Express 8 for x64. See Windows Task Manager and IIS Express system tray. enter image description here

enter image description here

查看更多
登录 后发表回答