1

I've always used miniprofiler with MVC and it works like a champ, is it possible to use it on a SPA/Static html page?

Thank you, Stephen

Stephen Patten
  • 6,333
  • 10
  • 50
  • 84

2 Answers2

3

Yes, you should be able to use it.

Same general setup in Application_BeginRequest. If you are using MVC to generate the html, include @MiniProfiler.RenderIncludes() as normal. If you cant do that, you will need to find some other way to include the relevant scripts (look at MiniProfiler/ui/include.partial.html to see what is being rendered).

Ajax requests from the page should be handled by MiniProfiler without issue, as long as you have everything hooked up properly.

I have MiniProfiler working right now for a rather large Angular SPA (MVC backend), works without any issues.

Yaakov Ellis
  • 40,752
  • 27
  • 129
  • 174
  • That's exactly my use case! Care to share the service that you inject to wire up Angular? ;) – Stephen Patten Aug 05 '14 at 14:06
  • 1
    No service. I have one MVC view that collects all of the base layout, css and scripts and Angular templates (organized as shared views), and spits them out for the initial request. Also include `RenderIncludes` in the view. Works like a charm. – Yaakov Ellis Aug 05 '14 at 14:08
0

Also keep in mind that you can check prior reports, so this could be a quick workaround.

see Accessing last profiled request section on https://miniprofiler.com/

Kind Contributor
  • 17,547
  • 6
  • 53
  • 70