Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

ASP.NET unhandled exception has occurred. Users reporting slow response

Posted on by Microsoft Employee

Hi All

This is my first post so please go easy on me :-)

We have users in our organization who use Dynamics CRM for customer relation queries, there is some custom development on top of this to tailor CRM to our business requirements.

The system has been in place for approx. 10 months and the environment is setup within our VMware environment with a front end, back end with email router and dedicated SQL database server based on Windows 2008 R2 and SQL 2008 R2 standard. All speced based on the recommendations from the Microsoft CRM planning Guide.

Users are reporting occasional slowdown issues with CRM when performing tasks such as mail merge, accessing records, normally its instant but on some occasions it can take minutes to load certain areas of CRM or on rare times it fails to load at all and you just get the circular loading icon.

While troubleshooting I have noticed some ASP.Net 4.0.303.19.0 Event ID 1309 errors.

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 10/03/2015 12:42:38
Event time (UTC): 10/03/2015 12:42:38
Event ID: af62043b515844de8ce608118171e695
Event sequence: 137108
Event occurrence: 1408
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/1/ROOT-1-130703726725507288
    Trust level: Full
    Application Virtual Path: /
    Application Path: E:\Program Files\Microsoft Dynamics CRM\CRMWeb\
    Machine name: CRMSERVERFE01
 
Process information:
    Process ID: 11856
    Process name: w3wp.exe
    Account name: DOMAIN\CRMAPP_AS
 
Exception information:
    Exception type: CrmException
    Exception message: INVALID_WRPC_TOKEN
   at Microsoft.Crm.Application.Security.WrpcContext.ValidateTokenState()
   at Microsoft.Crm.Common.Application.Pages.Activities.ActivityAttachmentDownload.ConfigurePage()
   at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e)
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

 
 
Request information:
    Request URL: http://*****/****/Activities/Attachment/download.aspx?AttachmentType=1001&AttachmentId=0908c230-45c2-e411-9265-0050568f6584
    Request path: /****/Activities/Attachment/download.aspx
    User host address: 10.1.0.1
    User: DOMAIN\UserName
    Is authenticated: True
    Authentication Type: NTLM
    Thread account name: DOMAIN\CRMAPP_AS
 
Thread information:
    Thread ID: 76
    Thread account name: DOMAIN\CRMAPP_AS
    Is impersonating: False
    Stack trace:    at Microsoft.Crm.Application.Security.WrpcContext.ValidateTokenState()
   at Microsoft.Crm.Common.Application.Pages.Activities.ActivityAttachmentDownload.ConfigurePage()
   at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e)
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 
 
Custom event details:

Any ideas what could be causing this?

Thanks

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: ASP.NET unhandled exception has occurred. Users reporting slow response

    Thanks for the responses.

    I need to check with my development team if we use any customisations, the lead developer for our CRM environment is on leave but will ask him this question when he returns.

    In terms of the version of CRM we are using it is Dynamics CRM 2013 Service Pack 1 Update rollup 1 (SP1) 6.1.1.1.132 (DB) 6.1.1.132

    Thanks

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: ASP.NET unhandled exception has occurred. Users reporting slow response

    What is the version and update roll up of CRM ?

    With the details given I can not say if there is a relation between the sporadic performance issue you get.

    But this error comes when the wall has activities which have attachment in it. If you use Firefox you can avoid the WRPC token verification and hence the error.

  • Bas van de Sande Profile Picture
    Bas van de Sande 4,383 on at
    RE: ASP.NET unhandled exception has occurred. Users reporting slow response

    Like Bruno asked in his reply: Do you have customizations  like jscript and plugins. In the case you have plugins running, did you verify if the plugins don't cause an event storm which definitely slows down your well specced environment.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: ASP.NET unhandled exception has occurred. Users reporting slow response

    Hi Both

    Thank you for your replies. As mentioned the CRM infrastructure is well spec-ed and conforms to Microsoft 'Recommended' specifications, note not minimum requirements.

    Our CRM users are relatively a small environment and we are a fresh environment and haven't migrated from previous CRM platforms so our DB sizes are at the moment quite small I would guess. The amount of active users of CRM would be no more than 20 users. We use CRM in our contact Centre where calls come in regarding complaints, issues and other general customer queries.

    For example our main CRM DB is just over 4GB with the log being just under 600mb.  We however don't run any maintenance tasks on the SQL database like  index maintenance. We do perform SQL backups via a separate application dedicated for backups.

    In terms of grow factor, I assume you mean auto growth on the database?

    The auto growth for the MDF is set and it is set to 256mb. For the log file (LDF) this is also set to 256mb but has a restricted growth of 2GB.

    All of our servers run within our VMware environment where the underlying hosts have been upgraded in the last 6 months to newer hardware so there is no contention to resources, in fact we have so much resources available that even the servers are not making use of it. An example I can give you is our dedicated CRM DB server is 4X CPU with 16gb and the actual memory being used is about 6gb and utilization across DB, Frontend and backend servers are generally very low.

    From reading a few articles I have learned that when CRM is configured there are jobs    run by the maintenance server that may affect performance:

    blogs.msdn.com/.../avoid-performance-issues-by-re-scheduling-crm-2011-maintenance-jobs.aspx

    I am starting this could be related.

    Is there a way I can check with CRM what time these tasks run? There are not SQL maintenance tasks but I believe they are in place within CRM.

    Just wanted to get others views on whether this would be worth pursuing, more importantly has anyone tried this?

    Many Thanks

  • Bas van de Sande Profile Picture
    Bas van de Sande 4,383 on at
    RE: ASP.NET unhandled exception has occurred. Users reporting slow response

    You might need to check your SQL Server databases. How is the grow factor set?

    Default Microsoft let the database grow by 1MB when needed. It is better to change this value to larger chunks of e.g. 100MB. Same applies for the database log files (set these to grow in MB instead of % and chunks of e.g. 25MB at a time).

    On small databases you won't notice a speed up altering this setting. Over time when databases grow your performance may go up by 20-30%

  • Bruno Lucas Profile Picture
    Bruno Lucas 5,421 on at
    RE: ASP.NET unhandled exception has occurred. Users reporting slow response

    this is the error above

    rajeevpentyala.wordpress.com/.../invalid_wrpc_token

    but it may not be the cause of performance.

    it could be you have some process (like a workflow) creating several instances that get stuck on waiting

    blogs.msdn.com/.../how-to-troubleshoot-system-jobs-failures-using-advanced-find.aspx

    you need to run performance checks on all servers, make sure SQL server has enough memory. It could be many different things

    msdn.microsoft.com/.../hh204512(v=crm.6).aspx

    Do you have customizations like plugins and JavaScript?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: ASP.NET unhandled exception has occurred. Users reporting slow response

    Bit of an update on this one..

    Managed to resolve the numerous ASP.Net 4.0.303.19.0 Event ID 1309 errors

    followed this blog and now the errors don't appear however still seeing some performance issues.....

    community.dynamics.com/.../ur-7-breaks-attachment-download-code-and-how-to-fix-it.aspx

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans