How do I get IIS Express to launch MVC3 web applic

2019-06-23 19:56发布

问题:

I referenced a DLL in a MVC3 web application. It compiled successfully. MVC3 project is running as Any CPU configuration property. I launched IIS Express 7.5 and I keep seeing the DLL is missing its dependencies exception.

I then created a windows application and referenced the DLL and it worked fine. So I realise it's something to do with IIS Express setting.

Dll is 64 bit. Can you please guide me

回答1:

IIS Express 8 has a 64 bit and a 32 bit version, which are both installed on a 64 bit machine.
See this question on how to run IIS Express in 64 bit mode, and then attach to process to debug.



回答2:

See the answer to this question. IIS Express 7.5 is a 32 bit application only so there is no way to get it to work with 64 bit DLL's. The same goes for the Visual Studio Development server.

You'll have to host your site in the full version of IIS for it to run. You can set that up by choosing "Use Local IIS Web server" in the Web section of the project properties.



回答3:

IIS Express 7.5 runs only as 32bit process. To run 64bit app, you should use full version of IIS.

  1. Make sure that build configuration is set to “Any CPU" for your MVC app.
  2. and also make sure that your application app pool set to run in 64 bit mode. Run the following command to do that

    appcmd set apppool /apppool.name: /enable32BitAppOnWin64:false