相关疑难解决方法(0)

Mini MVC profiler:似乎显示每个静态资源的配置文件时间

我刚刚开始使用mvc-mini-profiler(http://code.google.com/p/mvc-mini-profiler/),我觉得它很棒.但是,我在使用它时会遇到一些奇怪的行为.

我有一个在IIS7.5上运行的ASP.NET Webforms站点,出于某种原因,当我加载启用了探查器的页面时,我不仅得到了aspx页面的时间测量,而且我也得到了随机css和页面上的js资源.

aspx配置文件正常工作,SQL查询也正确分析.但是,如图所示,我还得到了一堆其他结果,这些结果似乎是静态CSS和JS文件的结果.据我所知,这些是由IIS静态提供的,因此甚至不应该为这些调用探查器代码.

我的Global.asax的相关部分是:

    protected void Application_BeginRequest()
    {
        MiniProfiler profiler = null;

        // might want to decide here (or maybe inside the action) whether you want
        // to profile this request - for example, using an "IsSystemAdmin" flag against
        // the user, or similar; this could also all be done in action filters, but this
        // is simple and practical; just return null for most users. For our test, we'll
        // profile only for local requests (seems …
Run Code Online (Sandbox Code Playgroud)

c# asp.net mvc-mini-profiler

28
推荐指数
1
解决办法
2679
查看次数

标签 统计

asp.net ×1

c# ×1

mvc-mini-profiler ×1