zoukankan      html  css  js  c++  java
  • MiniProfiler使用笔记

    MiniProfiler使用笔记

    安装步骤

    1. Install-Package MiniProfiler
    2. Install-Package MiniProfiler.EF6
    3. Install-Package MiniProfiler.MVC4

    后台配置

    1. 在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>
      <runtime>
    
    1. 在Global.asax.cs文件中添加和修改
    public class MvcApplication : System.Web.HttpApplication
        {
            protected void Application_Start()
            {
                AreaRegistration.RegisterAllAreas();
                RouteConfig.RegisterRoutes(RouteTable.Routes);
    
                MiniProfilerEF6.Initialize();
            }
    
            protected void Application_BeginRequest()
            {
                if (Request.IsLocal)
                {
                    MiniProfiler.Start();
                }
            }
    
            protected void Application_EndRequest()
            {
                MiniProfiler.Stop();
            }
        }
    

    前台页面配置

    1. 页面开始声明引用
    @using StackExchange.Profiling;
    
    1. 在body标签前添加
    @MiniProfiler.RenderIncludes()
    
  • 相关阅读:
    Python函数
    mysql实现体温管理系统
    python操作Mysql
    Python列表,元祖
    word中标题去掉前面的点
    关于浏览器被劫持解决方法
    小程序开发问题
    微信小游戏开发
    yii2修改默认控制器和布局视图
    yii2的url美化设置
  • 原文地址:https://www.cnblogs.com/Leman/p/5769741.html
Copyright © 2011-2022 走看看