question

PiyushMeshram-7317 avatar image
0 Votes"
PiyushMeshram-7317 asked PiyushMeshram-7317 commented

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

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?

dotnet-aspnet-mvc
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Breakpoint is triggering instantly at this point :-> Application_AuthenticateRequest(object sender, EventArgs e) in Global.asax file but after returning from the function it is taking too long to step over to next statement.

0 Votes 0 ·
PiyushMeshram-7317 avatar image
0 Votes"
PiyushMeshram-7317 answered PiyushMeshram-7317 commented

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 :)



image.png (4.9 KiB)
image.png (23.3 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

BTW, Pause (Break All) button look like this: (Default Shortcut: Ctrl+Alt+Break)

143948-image.png




0 Votes 0 ·
image.png (7.2 KiB)
YijingSun-MSFT avatar image
0 Votes"
YijingSun-MSFT answered

Hi @PiyushMeshram-7317 ,
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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.