IIS Express - 增加内存限制 [英] IIS Express - increse memory limit

查看:207
本文介绍了IIS Express - 增加内存限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在.NET MVC5中有一个VS项目,它加载一个使用大量内存的外部dll文件。平均而言,它使用500-1000MB内存。

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.

现在,当我尝试使用默认的IIS Express服务器调试我的项目时,我几乎总是得到OutOfMemory异常。

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

我知道正常的IIS有一个/ 3gb标志但是IIS Express呢。是否有任何设置,所以我可以启用此功能,还是除了在开发PC上安装完整的IIS之外还有其他任何解决方案吗?

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:开发者PC有Windows 8.1 64x和Visual Studio 2013。

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

推荐答案

默认情况下,Cassini和IISExpress都运行为32位...您可以通过添加/设置以下注册表项来配置Visual Studio 2012以使用IIS Express 64位:

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及更高版本支持这两种模式。在更改注册表以检查IISExpress进程并确保其从64位位置运行后,最好使用类似进程资源管理器的应用程序。在64位系统上安装IIS 8.0 Express时,32位和64位版本的IIS 8.0 Express将分别安装在%ProgramFiles(x86)%\ IIS Express和%ProgramFiles%中\ IIS Express文件夹。

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.

或者,您可以在本地安装IIS并将其配置为运行您的应用程序。您可以将Visual Studio配置为指向IIS的本地实例。

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.

这篇关于IIS Express - 增加内存限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆