Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6567139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:18:02+00:00 2026-05-25T14:18:02+00:00

I’ve installed the Stack Exchange MiniProfiler, and View Source shows that it is rendering

  • 0

I’ve installed the Stack Exchange MiniProfiler, and View Source shows that it is rendering the expected HTML. However it does not show the little profile detail box in the corner – what could be wrong?

<script src="/v2/Scripts/jquery-1.6.1.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="/v2/mini-profiler-includes.css?v=1.7.0.0">
<script type="text/javascript" src="/v2/mini-profiler-yepnope.1.0.1.js"></script>
<script type="text/javascript">
    yepnope([
        { test: window.jQuery, nope: '/v2/mini-profiler-jquery.1.6.1.js' },
        { test: window.jQuery && window.jQuery.tmpl, nope: '/v2/mini-profiler-jquery.tmpl.beta1.js' },
        { load: '/v2/mini-profiler-includes.js?v=1.7.0.0',
           complete: function() {
               jQuery(function() {
                   MiniProfiler.init({
                       ids: ["025bbb91-9605-44b7-b33d-d8b196326dbc","2c74ce3e-8de6-4f8d-920a-e8708b22231b"],
                       path: '/v2/',
                       version: '1.7.0.0',
                       renderPosition: 'left',
                       showTrivial: false,
                       showChildrenTime: false,
                       maxTracesToShow: 15
                   });
               });
         }
    }]);
</script>

And in my Global.asax.cs:

    protected void Application_BeginRequest()
    {
        if (Request.IsLocal)
        {
            MiniProfiler.Start();
        }
    }

    protected void Application_EndRequest()
    {
        MiniProfiler.Stop();
    }

enter image description here

EDIT: Thanks to Sam’s input I’ve tracked the problem to my .ajaxSetup() method. When it is commented out the profile box shows again. But I can’t see why this is a problem:

$.ajaxSetup({
    data: "{}",
    dataFilter: function (data) {
        var msg;

        if (data == "") {
            msg = data;
        }
        else if (typeof (JSON) !== 'undefined' && typeof (JSON.parse) === 'function') {
            msg = JSON.parse(data);
        }
        else {
            msg = eval('(' + data + ')');
        }

        if (msg.hasOwnProperty('d')) {
            return msg.d;
        }
        else {
            return msg;
        }
    }
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T14:18:03+00:00Added an answer on May 25, 2026 at 2:18 pm

    My guess is that the global dataFilter is interfering with MiniProfiler’s $.get() for jQuery Templates template files. Calling JSON.parse() on an HTML fragment will definitely throw an error.

    Since you’re using a recent version of jQuery, the optimized JSON parsing isn’t something you need to add manually. That functionality was included in jQuery core in 1.4.

    So, most simply, try changing your global dataFilter to this:

    $.ajaxSetup({
      data: "{}",
      dataFilter: function (msg) {
        if (msg.hasOwnProperty('d')) {
            return msg.d;
        }
        else {
            return msg;
        }
      }
    });
    

    If that doesn’t fix it, you might want to look into jQuery 1.5’s converters instead of the global dataFilter, which allow you to apply a dataFilter-like operation to responses of certain Content-Type. Some good examples from the guy that actually did the jQuery 1.5 AJAX rewrite here: http://encosia.com/jquery-1-5s-ajax-rewrite-and-asp-net-services-all-is-well/#comments

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.