Starting to look at some performance issues with a current project and saw that MiniProfiler is included in Umbraco. A couple of different blogs / forum posts have provided conflicting views as to how to set it up.
To configure MP, it looks like I have to do the following;
Set umbracoDebugMode="true" in the appSetting section of the web.config in the root.
Set compilation debug="true" in the web.config in the root.
Add @MiniProfiler.RenderIncludes() to the view I want miniprofiler to render in.
Navigate to the appropriate URL with ?umbDebug=true on the querystring.
Despite adding all these things, I still can't get mini profiler to display. Can anyone point me in the right direction?
Thanks for the quick reply. I've updated my config as you suggested, and removed the @MiniProfiler.RenderIncludes(), but I still see nothing.
I understand MiniProfiler will be available both in the website, and in the back office. I have checked both - to make sure my website code isn't interfering somehow with MiniProfiler - but it doesn't display in either.
There must be something really simple I'm missing!!
umbracoDebugMode doesn't matter unless you're on a pretty old version, else it should be true
compilation debug needs to be true
remove MiniProfiler.RenderIncludes() indeed
add ?umbDebug=true
runAllManagedModulesForAllRequests needs to be true
Of course it could be that the css in your site makes the miniprofiler appear behind some elements, view the source of the page and look for <script async type="text/javascript" id="mini-profiler" near the end of the page.
Thanks for the tip around checking the source code of the page to see if the script is there. I can see the script, but the profiler is not visible. I have checked the styles on the elements that were generated but there doesn't appear to be anything hiding it. On the front end of my site, I don't see any errors in the console.
I have tried the backoffice as I understand it should work there too. However the backoffice is throwing a console error:
Refused to get unsafe header "X-MiniProfiler-Ids"
I believe this is related to CORS. Any ideas? I am doing these tests on a website that is only available Internally within the business I work. I don't think this is a factor but I thought I should mention it.
Getting started with miniprofiler and Umbraco 7
Hi All,
Starting to look at some performance issues with a current project and saw that MiniProfiler is included in Umbraco. A couple of different blogs / forum posts have provided conflicting views as to how to set it up.
To configure MP, it looks like I have to do the following;
Despite adding all these things, I still can't get mini profiler to display. Can anyone point me in the right direction?
Thanks, James.
Hi James,
We have such configuration:
And you will see MiniProfiler little popup at right top corner of the site.
Thanks, Alex
Hi Alex,
Thanks for the quick reply. I've updated my config as you suggested, and removed the @MiniProfiler.RenderIncludes(), but I still see nothing.
I understand MiniProfiler will be available both in the website, and in the back office. I have checked both - to make sure my website code isn't interfering somehow with MiniProfiler - but it doesn't display in either.
There must be something really simple I'm missing!!
Thanks, James.
Almost:
Of course it could be that the css in your site makes the miniprofiler appear behind some elements, view the source of the page and look for
<script async type="text/javascript" id="mini-profiler"
near the end of the page.Hi Sebastiaan,
Thanks for the tip around checking the source code of the page to see if the script is there. I can see the script, but the profiler is not visible. I have checked the styles on the elements that were generated but there doesn't appear to be anything hiding it. On the front end of my site, I don't see any errors in the console.
I have tried the backoffice as I understand it should work there too. However the backoffice is throwing a console error:
I believe this is related to CORS. Any ideas? I am doing these tests on a website that is only available Internally within the business I work. I don't think this is a factor but I thought I should mention it.
Thanks,
Nathan
I had a similar issue, it was definitely running but not showing anything to the screen.
I managed to track it down to my rewrite rules (these are worth disabling to see if you can narrow it down to a particular rule)
My particular problem was with the default IIS rewrite rule to append the trailing slash to the URL.
Hope this helps others. David
I have a similar built-in rewrite rule that was causing me problems. My rule was:
I added in the following line inside the conditions to resolve the issue:
Hope that helps someone else who runs into the same issue as well :)
Every so often I find this answer helpful and try to high five it only to find out I already have :)
Just came accross this issue and this solved it for me too. Nice one Janae #H5YR
Janae you saved the day!
is working on a reply...