1.从NuGet上下载所需要的包:MiniProfiler.mvc,MiniProfiler,MiniProfiler.ef

2.Global.asax 加入

protected void Application_Start()
{

MiniProfiler.Settings.Results_Authorize = Request =>
{
#if DEBUG
  return true;
#else
  return false;
#endif
};

  StackExchange.Profiling.EntityFramework6.MiniProfilerEF6.Initialize();
}
protected void Application_BeginRequest()
{
  if (Request.IsLocal)//这里是允许本地访问启动监控,可不写
·  {
    MiniProfiler.Start();

  }
}

protected void Application_EndRequest()
{
  MiniProfiler.Stop();
}

3.在模板页中修改

<head>

    @using StackExchange.Profiling;

</head>

<body>
  @RenderBody()
  @MiniProfiler.RenderIncludes()
</body>

4. web.config 加入 system.webServer节点

<system.webServer>
<handlers>
<add name="MiniProfiler" path="mini-profiler-resources/*" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
</handlers>
</system.webServer>

最新文章

  1. paper 126:[转载] 机器学习中的范数规则化之(一)L0、L1与L2范数
  2. docker containerd中的容器操作
  3. python语法笔记(四)
  4. 【Android Api 翻译1】Android Texting(2)Testing Fundamentals 测试基础篇
  5. ASP.NET MVC中使用ASP.NET AJAX异步访问WebService
  6. MVC-Model数据注解(一)-系统(DataAnnotations)
  7. MFC中spin control使用
  8. Android面试题集锦 (转)
  9. 一篇关于Maven项目的jar包Shell启动脚本
  10. OpenStack之Fuel架构及其工作原理
  11. MySQL 千万级 数据库或大表优化
  12. 【Python 06】汇率兑换1.0-1(IPO与字符串转数字)
  13. Findout之为什么公司内部不能使用SSH协议连接外网服务器
  14. jQuery文档操作
  15. Elasticsearch5.5 多机集群配置和x-pack安装配置
  16. LVN与其在Linux上的实现
  17. html form method 属性不支持put,delete请求方式,以及开启spring mvc的rest的方式
  18. 一些java的部署执行编译等命令
  19. Bootstrap-CL:标签
  20. 关于restful开发的疑惑

热门文章

  1. 矩阵压缩写法 scipy spark.ml.linalg里都有,CRS,CCS
  2. Java迭代器原理
  3. 【Hadoop】YARN 原理、MR本地&amp;YARN运行模式
  4. ES怎么进行字段添加索引,并保留原有数据
  5. windows 2003子目录权限丢失及子目录权限无法继承更改的解决方法
  6. Tomcat 启动或者发布项目时提示Publishing failed:Resource /xxxx does not exist
  7. Material Design (二),TextInputLayout的使用
  8. Android学习(十) SQLite 基于SQL语句的操作方式
  9. 通过特定获取获取电脑外网IP地址
  10. ios 使用gcd 显示倒计时