I'm working on ASP.NET WebForms application and trying to implement MiniProfiler. I have latest version from NuGet (4.0.138) and I implemented all neccessary steps in Global.asax and web.config.
Global.asax:
Sub Application_Start(sender As Object, e As EventArgs)
MiniProfiler.Configure(New MiniProfilerOptions With {
.RouteBasePath = "~/mini-profiler-resources",
.StackMaxLength = 256,
.TrackConnectionOpenClose = True
})
End Sub
Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
MiniProfiler.StartNew()
End Sub
Sub Application_EndRequest()
MiniProfiler.Current?.Stop()
End Sub
Web.config:
<handlers>
<add name="MiniProfiler" path="mini-profiler-resources/*" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
</handlers>
Default.aspx (somewhere at the bottom):
<%=MiniProfiler.Current.RenderIncludes() %>
<%=MiniProfiler.Current.Render() %>
The problem is that MiniProfiler.Current.RenderIncludes() always returns an empty string while MiniProfiler.Current.Render() actually returns some data.
I need RenderIncludes() beacuse it should generate JS code that shows results nice formatted.