DebugDiag和MVC4没有可用的堆栈跟踪 [英] DebugDiag and MVC4 gives no usable stacktrace

查看:180
本文介绍了DebugDiag和MVC4没有可用的堆栈跟踪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚在生产服务器上遇到了CPU严重问题,因此决定在本地进行此类情况的调试以为将来做准备,但是当我尝试调试本地MVC4站点时,却没有得到相同的信息堆栈跟踪就像本教程一样.

I just experienced a high CPU issue on our production aserver and decided to practice debugging such situations locally to be prepared for this in the future, but when I try to debug a local MVC4 site, I dont get the same informative stack trace as the tutorial does.

问题: 有谁知道是否有可能获得更丰富的堆栈跟踪信息?

Question: Does anyone know if it is possible to get a more informative stack trace?

我希望在某个地方看到HomeController.Index,但我看到的唯一方法调用是:

I would expect to see HomeController.Index somewhere but the only method call I see is:

System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr,System.Web.RequestNotificationStatus ByRef)

System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr, System.Web.RequestNotificationStatus ByRef)

本地设置

我使用 .Net 4 创建了一个本地 MVC4站点,该站点在本地IIS 8.0 (不是iis express)上运行,以模拟服务器环境.我的本地计算机运行 Windows 8 .

I created a local MVC4 site, using .Net 4, running on the local IIS 8.0 (NOT iis express) to simulate the server environment. My local machine runs Windows 8.

调试工具:Debug Diagnostics 1.2

我点击了以下链接: http://www.iis.net/learn/troubleshoot/performance-issues/troubleshooting-high-cpu-in-ans-iis-7x-application-pool

在图6-DebugDiag分析报告"中.有一个堆栈跟踪的屏幕快照,其顶行包含"FastApp._default.Page_Load(System.Object,System.EventArgs).

At "Figure 6 - A DebugDiag analysis report." there is a screenshot of a stacktrace with the top line containing "FastApp._default.Page_Load(System.Object, System.EventArgs).

教程屏幕截图:

我的屏幕截图:

我的模拟最大CPU使用率的代码:

public class HomeController : Controller
{
 public ActionResult Index(int seconds)
 {
  ViewBag.Message = "Modify this template to jump-start your ASP.NET MVC application.";

  DateTime start = DateTime.Now;
  while (DateTime.Now.Subtract(start) < TimeSpan.FromSeconds(seconds))
  {
    "".ToString();
  }
  return View();
 }
}

可能的副本:

DebugDiag在.NET 4下未显示.NET堆栈信息

推荐答案

Debug Diag 1.2可能无法为您提供.net Framework 4.0的正确堆栈跟踪.实际上,它根本不是适用于.net 4.5的正确堆栈.

Debug Diag 1.2 may not give you correct stack traces for .net framework 4.0. In fact it does not you the correct stack for .net 4.5 at all.

您应该使用Debug Diag 2.0来分析针对框架4.0及更高版本的内存转储.您可以从 http://www.microsoft.com获得该工具/en-us/download/details.aspx?id=40336

You should use Debug Diag 2.0 to analyze memory dumps targeted for framework 4.0 and above. You can get the tool from http://www.microsoft.com/en-us/download/details.aspx?id=40336

这篇关于DebugDiag和MVC4没有可用的堆栈跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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