FeaturedIT topics

How to use MiniProfiler in ASP.Net Core

Performance of web applications is a serious concern the world over. Developers have many tools they can use to profile web applications and find the performance bottlenecks. MiniProfiler is one such tool — a simple yet powerful tool for profiling web applications. MiniProfiler helps you detect slow running queries, slow server response times, and more. 

MiniProfiler is available for .Net, ASP.Net, and ASP.Net Core. You’ll find the documentation for MiniProfiler on GitHub. This article presents a discussion of MiniProfiler, why it is useful, and how we can use it to profile ASP.Net Core MVC applications and discover performance issues in our applications.

Create an ASP.Net Core MVC project in Visual Studio 2017

First off, let’s create an ASP.Net Core MVC project in Visual Studio. If Visual Studio 2017 is up and running in your system, follow the steps given below to create an ASP.Net Core MVC project.

  1. Launch the Visual Studio 2017 IDE.
  2. Click on File > New > Project.
  3. Select “ASP.Net Core Web Application (.Net Core)” from the list of templates displayed.
  4. Specify a name for the project.
  5. Click OK to save the project.
  6. A new window, “New .Net Core Web Application…”, will be displayed.
  7. Select .Net Core as the runtime and ASP.Net Core 2.1 (or later) from the drop-down list at the top. I’m using .Net Core 2.2.
  8. Select “Web Application (Model-View-Controller)” as the project template (as shown in Figure 1 below).
  9. Ensure that the check boxes “Enable Docker Support” and “Configure for HTTPS” are unchecked. We won’t be using these features here.
  10. Ensure that “No Authentication” is selected. We won’t be using authentication here either.
  11. Click OK. 

Related Articles

Back to top button