MVC-Mini-Profiler – Web Forms – Can’t find /mini-profiler-results

I’m trying to get MVC-mini-profiler to work with webforms.

NUGET
I’ve installed the Nuget package.

PM> Install-Package MiniProfiler

Head
I have this in the head section of my website.

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<%= MvcMiniProfiler.MiniProfiler.RenderIncludes() %>

DAL
I’m using it inside one function as a POC. This is not in the Global.asax (I dont know if that’s required or not.)

profiler = MiniProfiler.Start();

using (profiler.Step("Im doing stuff"))
{
   //do stuff here
}

MvcMiniProfiler.MiniProfiler.Stop();

Result
It renders a <div class="profiler-results left"></div> tag on my page, but it is empty.

If I look at the chrome console I see a 404 trying to find: http://example.com/mini-profiler-results?id=339d84a7-3898-429f-974b-64038462d59a&popup=1

Question
Am I missing a step to get the /mini-profiler-results link to work?

Answer
The response I marked as answer led me to think that it had nothing to do with my configuration (which is true). I am using Umbraco 4.7.0. I had to add “~/mini-profiler-results” to umbracoReservedUrls and umbracoReservedPaths in my web.config.

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

The following page worked just great for me after installing the NuGet package:

<%@ Page Language="C#" %>
<%@ Import Namespace="MvcMiniProfiler" %>
<%@ Import Namespace="System.Threading" %>

<script type="text/c#" runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
        MiniProfiler.Start();
        using (MiniProfiler.Current.Step("I'm doing stuff"))
        {
            Thread.Sleep(300);
        }
        MiniProfiler.Stop();
    }
</script>

<!DOCTYPE html>
<html>
<head runat="server">
    <title></title>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
    <%= MiniProfiler.RenderIncludes() %>
</head>
<body>
    <form id="Form1" runat="server">
        <div>Hello World</div>
    </form>
</body>
</html>


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x