VS 2015 MVC OutOfMemoryException [英] VS 2015 MVC OutOfMemoryException

查看:130
本文介绍了VS 2015 MVC OutOfMemoryException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试调试MVC5 Web应用程序-非常简单.我读过文章和SO的问题与答案,并尝试了一些事情,直到脸色发青为止,但仍然无法弄清楚为什么我会收到此错误消息.

引发了类型为'System.OutOfMemoryException'的异常.

在执行当前Web请求期间发生未处理的异常.请查看堆栈跟踪,以获取有关错误及其在代码中起源的更多信息.

环境: -VS 2015 -Windows 10专业版N -IISExpress -MVC5 Web应用程序

直到大约两周前,我才使用VS 2013,在升级到Windows 10之后才切换到2015.直到切换到2015,我才看过这个项目.项目几乎不大且不占用内存,数据库很可能有一打有两行的表,甚至都不是这个项目(这恰好是我目前最活跃的项目).

我已完成以下操作:

  • 在发生这种情况时,确认机器资源没有峰值(CPU小于10%,内存为14gb,尝试启动调试时使用6.7gb时几乎处于平坦状态(与我不尝试启动时的正常情况相同,没有峰值)全部))
  • 播放调试设置足以确保在关闭会话/停止调试后IISExpress不会在后台运行.
  • 将IISExpress放在系统上尝试在哪里可以手动停止应用程序并关闭它
  • 已确认iisexpress没有继续运行的挂起进程3
  • 清除了每个临时文件夹以及我读过的所有其他窍门

但是,每三到四次按F5键开始调试时,都会出现此错误.有时我可以看到IISExpress正在运行,将其杀死并重试,然后它可以正常工作.有时,唯一有效的方法是重新启动Visual Studio.

我需要每次都要调试VS时都要重新启动VS.这太疯狂了,我找不到丝毫原因.

我精打细算,以至于我认为这可能是VS2015的错误,可能是在Windows 10 Professional(N)上运行时?

有人吗?请?!?! (如果有人认为有帮助,可以提供完整的堆栈跟踪)

解决方案

尝试此链接,并在评论中提供其他帮助.

链接一: http://weblogs.asp.net/morteza/OutOfMemoryException

具体来说,将选项设置为使用64位版本的IIS:

工具->选项->项目和解决方案-> Web项目,顶部复选框.确保已选中.

并尝试这些链接 链接一个, 链接两个

Trying to debug an MVC5 web app - quite basic. I've read articles and SO questions and answers and tried things until I'm blue in the face, and still can't figure out why I'm getting this error.

Exception of type 'System.OutOfMemoryException' was thrown.

An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Environment: - VS 2015 - Windows 10 Professional N - IISExpress - MVC5 Web Application

I used VS 2013 up until about two weeks ago, switched to 2015 after an upgrade to Windows 10. I've never seen this until switching to 2015. The project(s) are hardly large and memory consuming, the database probably has a dozen tables with two dozen rows in it, and it's not even this single project (this just happens to be my most active one at the moment).

I've done the following:

  • Verified no spikes in machine resources when this occurs (CPU < 10%, 14gb memory, pretty much flatlined at 6.7gb usage when trying start the debugging (same as normal when I'm not trying to start, no spikes at all))
  • Played with debug settings sufficient to ensure that IISExpress doesn't stay running in the background after I close the session/stop debugging.
  • Put IISExpress on the system try where I can manually stop application and close it
  • Verified that there's no hanging processes of iisexpress continuing to run3
  • Cleared out every temp folder and every other trick I've read about

Yet, every three or four times I hit F5 to start debugging, I get this error. Sometimes I can see IISExpress running, kill it and retry and it works fine. Sometimes the only thing that works is restarting Visual Studio.

I go through runs where I have to restart VS every other time I want to debug the application. This is insane, and I can't find the slightest trace of a cause.

I'm at my wits end, enough to the point where I'm thinking this has to be a bug with VS2015, possibly when running on Windows 10 Professional (N)?

Anyone? Please?!?! (can provide full stack trace if someone thinks it helpful)

解决方案

try this link and others in the comment these will help to you.

link one :http://weblogs.asp.net/morteza/OutOfMemoryException

Specifically, setting the option to use 64 bit version of IIS:

Tools -> Options -> Projects and Solutions -> Web Projects, top checkbox. Make sure it's checked.

and try these links also link one, link two

这篇关于VS 2015 MVC OutOfMemoryException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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