Reputation: 115
We are trying to understand the time consumption for a page's first load , which is being taken up be the below exception. We are unable to catch this exception either in compile time or run time. Running "Stackify Prefix" profiler the error details are displayed, we are unable to find the root cause for this issue.
Any leads on this issue would be helpful.
Thanks in advance.
Update :-
Enabled Argument exception is Visual studio and it caught the exception as below,But still trying to understand from where this is being invoked
Update 2:-
All, Please need help in solving this issue. Any Leads would be grateful.
Upvotes: 0
Views: 579
Reputation: 1000
Matt here from Stackify:
The .NET framework throws a lot of exceptions internally that are never exposed.
For example, accessing the MemoryCache for the first time throws an exception with a message about performance counters. We automatically hide some of these in Prefix because they are truly noise.
There are other instances like this where they are swallowed and never bubbled up to your code.
The exception you are seeing could very well be the exact same type of issue. These could be weird internal exceptions on the first ASP.NET page load.
I would say if they only happen on the first page load and you can't "catch" them as you have described, not to worry about them.
One of the cool features of our products is we can catch all first-time exceptions and make them visible. Sometimes they are just noise though.
In your case, the stack trace seems related to template parsing. Maybe it doesn't like something in your Razor view. Maybe in your Razor code you have an item with duplicate attributes?
You can learn more about Prefix, our free tool, here: https://stackify.com/prefix/
We have a good article about finding all exceptions here: https://stackify.com/csharp-catch-all-exceptions/
Upvotes: 2