MiniProfiler not showing up on asp.net MVC

前端 未结 3 1352
一向
一向 2020-12-14 07:32

I added this to my Global.asax.cs:

protected void Application_BeginRequest()
{
    if (Request.IsLocal)
    {
        MiniProfiler.Start();
    }
}

protecte         


        
3条回答
  •  南笙
    南笙 (楼主)
    2020-12-14 08:08

    If anybody tried Alden's solution and still does not work for you, try setting discardResults to false as suggested by willgrosett

       // Global.asax.cs file
       protected void Application_BeginRequest()
        {
            if (Request.IsLocal)
            {
                MiniProfiler.Start();
            }
        }
    
        protected void Application_EndRequest(object sender, EventArgs e)
        {
            MiniProfiler.Stop(discardResults: false);
        }
    

提交回复
热议问题