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 6963655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:49:18+00:00 2026-05-27T15:49:18+00:00

I really like what I’ve seen regarding MvcMiniProfiler . I’d love to use the

  • 0

I really like what I’ve seen regarding MvcMiniProfiler. I’d love to use the SQL monitoring features on non-web applications (windows services, unit tests, etc). Is this possible, or does it require an HTTP environment? The obvious difference would be results delivery, but if I can serialize the results to JSON or somesuch, that would be fine.

I threw together a simple unit test trying to get it to work, but MiniProfiler.Current appears to always be null, even after executing MiniProfiler.Start().

Am I barking up the wrong tree here?

  • 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-27T15:49:19+00:00Added an answer on May 27, 2026 at 3:49 pm

    Excellent question. The core (the profiler instance and the connection wrappers) are not tied to http. If you can create your own instance, it should all work. However, all of the UI code is geared around web applications.

    I know of people using it in WPF, winforms, etc – so it should work fine. However, you would also need to figure out a logical “unit of thing to me measured”. In a web app it is obvious: a request.

    Note that MiniProfiler.Current is purely a convenience (you could put an instance anywhere), but I’m pretty sure we made that possible to create your own abstraction (rather than http context).

    (goes to check the code)

    ah yes, here we go:

    public static MiniProfiler Current
    {
      get
      {
        MiniProfiler.Settings.EnsureProfilerProvider();
        return MiniProfiler.Settings.ProfilerProvider.GetCurrentProfiler();
      }
    }
    

    so you can provide your own ProfileProvider and then .Current should work.

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

Sidebar

Related Questions

I really like ASPxGridView, but I can't use .NET to develop my applications. I
I really like being able to use =~ and !~ in Perl to evaluate
I really like the looks of jQuery UI and I'd love to integrate it
I really like Tornado and I would like to use it with Python 3,
I really like to use spring stereotype annotated beans in spring MVC apps and
I really like the carousel on the Google Chrome Web Store. It is beautiful,
I really like to not have to make the thumbnails, so i use timthumb.php
I really like this suggestion on StackOverflow to use an IClock interface to supply
I really like the magento structure but finding things is very hard ;) My
I really like the MVC way and have actually enjoyed learning ASP.NET MVC (I

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.