IIS Express - increase memory limit

17,674

Solution 1

Go to Visual Studio - Tools - Options Menu

Choose: - Projects and Solutions, then Web Projects

tick the checkbox: "User the 64 bit version of IIS Express for web sites and projects"

No Registry edit necessary.

Solution 2

Both Cassini and IISExpress runs as 32 bit by default... You can configure Visual Studio 2012 to use IIS Express 64-bit by adding/setting the following registry key:

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

IIS Express 8 and above supports both modes. Best to use an application like process explorer after making the registry change to inspect the IISExpress process and make sure that its running from the 64 bit location. When you install IIS 8.0 Express on a 64-bit system, both the 32-bit and 64-bit versions of IIS 8.0 Express will be installed respectively in the "%ProgramFiles(x86)%\IIS Express" and "%ProgramFiles%\IIS Express" folders.

Alternatively, you can install IIS locally and configure it to run your application. You can configure Visual Studio to point to a local instance of IIS.

Share:
17,674
Gapipro
Author by

Gapipro

Updated on June 03, 2022

Comments

  • Gapipro
    Gapipro almost 2 years

    I have a VS project in .NET MVC5 which loads an external dll file that uses a lot of memory. In average it uses from 500-1000MB memory.

    Now when I try to debug my project with default IIS Express server I almost always get OutOfMemory exception.

    I know that there is a /3gb flag for normal IIS but what about IIS Express. Are there any settings so I can enable this or is there any other solution to this problem except of installing a full IIS on development PC?

    PS: Developer PC has Windows 8.1 64x and Visual Studio 2013.

  • Ross Brigoli
    Ross Brigoli over 9 years
    The registry value doesn't seem to work in Visual Studio 2010. Is there any equivalent for this in VS 2010?
  • Chaulky
    Chaulky over 9 years
    For Visual Studio 2013, just change 11.0 to 12.0 in the registry key path
  • Black Frog
    Black Frog almost 9 years
    This registry changed worked for Visual Studio 2015 RC which is 14.0.
  • bendemes
    bendemes almost 8 years
    I much prefer this to the accepted answer. This still works fine on VS2015 and saves any unneeded registry changes.
  • Legends
    Legends almost 8 years
    Restarted VS2015 to take notice of the registry changes in 14.0
  • MWD
    MWD almost 8 years
    Great answer.. Worked in VS 2015 :)
  • sagar
    sagar over 7 years
    Agree!! This should ideally be the selected answer.. Works well in VS2013 Update 5 as well.
  • Josh Noe
    Josh Noe over 7 years
    For me, this resulted in a "Could not load file or assembly. An attempt was made to load a program with an incorrect format."
  • Gerrie Pretorius
    Gerrie Pretorius over 7 years
    @JoshNoe one of your dependencies is probably a 32bit version. so you will need to get a 64bit version of that dependency, if that is not possible, you will need to continue working with 32bit version of IIS Express
  • Michael Harper
    Michael Harper about 7 years
    thanks for this, I actually knew about this but reset my VS settings and forgot about the 64bit flag!
  • Nathan
    Nathan almost 5 years
    This worked for me as well in VS 2015, great answer!