Share via


Debugging VS2013 Websites Using 64-bit IIS Express

6 April 2016 Update: Added the correct values for VS2015.


 

If you are working on ASP.NET MVC web sites in Visual Studio 2013 (VS2013) or 2015 (VS2015), you need to make one registry change if you want to run IIS Express as a 64-bit process by default.  Use one of the methods, below.

Within VS2013 or VS2015:

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

* Thanks to Christian Lundestad, David, Javier Collazo and Eliza for pointing this method out in the comments.

Command-Line:

For VS2013, use

 reg add HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\WebProjects /v Use64BitIISExpress /t REG_DWORD /d 1

For VS2015, use

 reg add HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\WebProjects /v Use64BitIISExpress /t REG_DWORD /d 1

Regedit:

  1. For VS2013, navigate to:

     HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\WebProjects
    
  2. For VS2015, navigate to:

     HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\WebProjects
    
  3. Make sure there is a REG_DWORD value named “Use64BitIISExpress”.  If not, create it.

  4. Set its value from 1 (default = 0).

That’s it.  Now you can debug your 64-bit web sites.

If you don't do this, you will likely get a message similar to:

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

I found this solution for Visual Studio 2012 (VS2012) on Stack Overflow here.

Rob

Comments

  • Anonymous
    February 02, 2014
    Thank you very much Rob! I have a web app that uses the Oracle database and the client library I'm using is platform-specific, so your tip was essential in getting my app running with IIS Express. I also noticed that Mads Kristensen said the problem was fixed in Visual Studio 2013, but I don't know what he meant. See visualstudio.uservoice.com/.../3254745-allow-for-iis-express-64-bit-to-run-from-visual-st .

  • Anonymous
    February 13, 2014
    There is an now option for this in Visual Studio 2013. Tools | Options | Projects and Solutions | Web Projects | Use the 64 bit version of IIS Express…

  • Anonymous
    March 29, 2014
    Christian - nice find.  Thanks!

  • Anonymous
    September 18, 2014
    Thanks guys, I was struggling with an OutOfMemoryException error when testing session state serialization.  Changing my VS 2013 setting to use 64 bit IIS Express solved the problem.

  • Anonymous
    October 13, 2014
    Thanks Rob!!!.  Do you have any thoughts on configurring the Local IIS to support MVC

  • Anonymous
    January 19, 2015
    Thank a lot! I'm stuck por 1 day!!

  • Anonymous
    July 15, 2015
    In VS2013 you should all be going to --> Tools | Options | Projects and Solutions | Web Projects | Use the 64 bit version of IIS Express for web sites and projects…

  • Anonymous
    July 27, 2015
    Christian, thanks a lot!...

  • Anonymous
    August 04, 2015
    Christian, you made my day ! Thanks a LOT

  • Anonymous
    August 10, 2015
    Thank you. I did not know that IIS Express default using x86 platform

  • Anonymous
    August 12, 2015
    Thanks!   Visual Studio 2015 same problem.   I forgot you had to do this to work with the Office 64-bit dll's too!

  • Anonymous
    September 03, 2015
    Thanks Christian, i have the same issue in VS2013 N¿and i fix it with option: Tools | Options | Projects and Solutions | Web Projects | Use the 64 bit version of IIS Express…

  • Anonymous
    October 06, 2015
    they could have made the VS more intelligent by sensing the 32/ 64 bit machine and run it by default...

  • Anonymous
    October 26, 2015
    Thanks. You've saved my whole day

  • Anonymous
    November 19, 2015
    Allow for IIS Express 64 bit to run from Visual Studio 2013 TOOLS>OPTIONS>Projects and Solutions>WEB PROJECT and allow

  • Anonymous
    March 12, 2016
    cool.... very nice sir