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?
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)
Local setup
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 tool: Debug Diagnostics 1.2
I followed this link: http://www.iis.net/learn/troubleshoot/performance-issues/troubleshooting-high-cpu-in-an-iis-7x-application-pool
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).
The tutorial screenshot:
My screenshot:
My code simulating max CPU usage:
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();
}
}
Possible duplicate: