美文网首页asp.net mvc
MiniPorfiler监控 步骤说明

MiniPorfiler监控 步骤说明

作者: 落地成佛 | 来源:发表于2018-07-09 09:57 被阅读3次

    MiniPorfiler监控 步骤说明
    1.引用程序集:MiniProfiler 和 MiniProfiler.EF6
    2.web.config添加配置:
     <system.webServer>
    <handlers>
    <add name="MiniProfiler" path="mini-profiler-resources/" verb="" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
    </handlers>
    </system.webServer>
    3._Layout 添加界面显示:
    @using StackExchange.Profiling;
    @MiniProfiler.RenderIncludes();

    1. Global.asax添加启动项
      protected void Application_BeginRequest()
      {
      if (Request.IsLocal)
      {
      MiniProfiler.Start();
      }
      }
      protected void Application_EndRequest()
      {
      MiniProfiler.Stop();
      }

    相关文章

      网友评论

        本文标题:MiniPorfiler监控 步骤说明

        本文链接:https://www.haomeiwen.com/subject/dsdzuftx.html