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:
Can anyone explain to me what's going on here? I'm expecting only one to show.