asp.netwebformsmvc-mini-profilerminiprofiler

MiniProfiler page loading twice per request


I've boiled this down to the smallest example:

Test.aspx

(Code behind is empty)

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="C3.Pages.Test" %>
<%@ Import Namespace="StackExchange.Profiling" %>
<!DOCTYPE html>
<body>
    <%=MiniProfiler.RenderIncludes() %>
</body>

Global.asax

    protected void Application_BeginRequest()
    {
        if (Request.IsLocal)
        {
            MiniProfiler.Start();
            var ignored = MiniProfiler.Settings.IgnoredPaths.ToList();
            ignored.Add("WebResource.axd");
            MiniProfiler.Settings.IgnoredPaths = ignored.ToArray();
        }
    }
    protected void Application_EndRequest()
    {
        MiniProfiler.Stop();
    }

This produces the result:

enter image description here

enter image description here

enter image description here

Can anyone explain to me what's going on here? I'm expecting only one to show.


Solution

  • Right, figured it out. It was an old version of Adblock Plus that was for some reason requesting each page twice.

    Running in Incognito mode stopped the issue happening. Updating the Adblock Plus extension fixed the issue.