ASP NET MVC Web app is taking too long to route to new controller action taking too long.

Piyush Meshram 136 Reputation points
2021-10-26T03:51:29.253+00:00

I am using ASP.NET MVC WEB APP developed in .NET 4.8 Framework.

Application starts successfully asks for login user logs in successfully with no issue and redirected to home->dashboard page.

From Dashboard, its taking too long to switch to some other route (for Ex ControllerA->ActionA).

I thought the problem must be in cshtml (view) file. But no luck even after putting a breakpoint there. It is still taking too long.

The same (Home->Dashboard) page is taking too long to load on refresh (as it was not the case when application first started).

How to debug this scenario?

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,248 questions
{count} votes

Accepted answer
  1. Piyush Meshram 136 Reputation points
    2021-10-27T04:05:54.217+00:00

    After hours of time waste, I found a simple solution to debug the above case:

    Simply press "pause" button to halt the ongoing execution, then you will see a breakpoint like this:

    144033-image.png

    Then you will know whats taking time.

    If you see screen like this on pause:

    144016-image.png

    Just continue the execution, wait and hit pause again.

    Hope this helps :)


1 additional answer

Sort by: Most helpful
  1. Yijing Sun-MSFT 7,066 Reputation points
    2021-10-26T08:59:46.487+00:00

    Hi @Piyush Meshram ,
    How do you write your view page? How do your write your route tables? Maybe you have something more complicated.
    Best regards,
    Yijing Sun


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments