04. Enable MiniProfiler debugging in NopCommerce

Source: Internet
Author: User
Tags nopcommerce

Recently, when debugging NopCommerce, we often encounter an address that does not know which route to request (for example, http: // localhost/apparel-shoes, such as http: // localhost/login) can you quickly tell which controller and which action is used? Of course, you can search and view it in the background, but now you have a tool that you can add to the page to display routing and other information on the current page. This is our topic MiniProfiler today, let's begin!

1. Introduction to MVC MiniProfiler

MVC MiniProfiler is a small program designed by the Stack Overflow team to analyze the performance of ASP. net mvc, WebForm, and WCF. You can monitor a page and other pages accessed through direct reference, Ajax, and Iframe. The monitoring content includes the database content, the SQL statements used to access the database (EF and EF CodeFirst are supported) are displayed ). And displayed on the page in a friendly way.

My summary is that you can view the MVC routing and analyze the page execution time.

 

2. Enable MiniProfiler debugging in NopCommerce

1st modification: in global. asax, this parameter will be used to directly start debugging for local localhost access)

Change

 

2nd modification: in global. asax, the local localhost access will be directly disabled for debugging)

 

Modify at 3rd: In _ Root. Head. cshtml

 

Add Request. Islocal

 

 

 

 

3. Test Results

We can easily see the route information and execution time, as well as more functional options. Let's take a look! Let's get there today!

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.