NOTE: This blog was updated on 7/25/2012: As some of you commented the binaries were missing from the KB article posted, the patches are now available for download within the KB apologies for any confusion around this. Adds/changes are highlighted below.
On July 9th, 2013 the .NET team released a Critical Security Patch (KB 2840628) that was release to mitigate identified security risks in .NET Framework Version 4.0. After applying this critical update customers using partial trust experienced issues including Dynamics CRM customers running sandbox plug-ins. The issue was limited to the use of specific methods within the System.Diagnostics namespace, which are also commonly used in Dynamics CRM sandbox plugins. The .NET team working with the CRM Support team has identified the source of the problem and is working on a long term solution to address this specific problem with Partial Trust Code, which includes Dynamics CRM Customers using sandbox plugins. The following article documents the known workarounds and also provides patches to fix these documented symptoms: http://support.microsoft.com/kb/2872041
If you are using CRM plug-ins registered in sandbox mode (or running other custom partial trust code) you may be experiencing the exception below. If you are seeing the below error message, please use the workaround or install the patches listed in KB 2872041 to temporarily resolve the issue and stay posted for a longer term fix.
System.MethodAccessException: Attempt by method ‘System.Configuration.TypeUtil.CreateInstanceRestricted(System.Type, System.Type)’ to access method ‘System.Diagnostics.AssertSection..ctor()’ failed.
NOTE: This only applies to .NET Framework 4.0, there has been no reported issues with .NET Framework 4.5.
If you are still encountering this message after installing the patches please open a support case so the support team can help you troubleshoot further.
Sean McNellis Premier Field Engineer
This is also documented on the Dynamics CRM Support Team blog: https://community.dynamics.com/crm/b/dynamicscrmsupportblog/archive/2013/07/22/release-of-critical-update-for-net-4-0-framework.aspx
I can't see the link to download the patch?
Hi Johng, I'm looking into this, I was under the impression there was a fix available already. For now please use the workaround and I'll keep you posted with any type of fix made available.
Thanks for following up with us on this!
@Johng - I've updated the blog post now again, the patches going live were slightly delayed behind the KB going live - it's all up and available at this point now though. Thanks!
Thanks for the update that's great.