0
votes

At one of our production instance that is CRM 2013 Online we are getting following error in ajax call's (POST) error handler (XHR.responseText):

"error": { "code": "-2147220970", "message": { "lang": "en-US", "value": "System.TypeLoadException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #0EBC6CBF" } } }

The .NET plugin code in question is working fine on our 2013 on-premise development instance with SP1 UR2 installed. I also checked the version number and both Online production isntance and On-premise development instance are set to 6.1.2.112 version.

The plugin code is written in C# and deployed as an assembly over the Dynamics CRM. As this is happening on CRM Online I fear I can't debug the code or take traces of it?

3
Maybe you should update that plug-ins with the Technical Account, try with this user.Sxntk
Thanks. I didn't understand how to update the plug-in with Technical Account. Can you please point towards any resource for this?Khadim Ali
What account do you use to deploy?Sxntk
I've recently started getting the same error, in the exact same situation. The plugin works in 2013 on prem, and 2015 online, but it fails in 2013 online. And it's not a new plugin, it's been working fine for a long time. I suspect Microsoft changed or updated something on their end. I would open a ticket with them.Wedge
FYI: Even in CRM Online, you can use the Plugin Profiler to debug plugins. It's works great, but I use it as a last resort, because it is rather cumbersome.Wedge

3 Answers

1
votes

Check if any external types (referenced assemblies) are being used in your plugin as these won't be supported in an online installation but may work on premise if they are being served from the GAC.

You may also be trying to perform an action that requires full trust which isn't supported in a Sandbox plugin.

1
votes

It is likely that you are doing an Assembly.Load call in the static constructor of the plugin, which is not available in Sandbox mode, which is what CRM Online requires.

EDIT:

I would create a support case with Microsoft and provide the reference number, and you'll be able to look at which reference is actually breaking.

0
votes

At last I found the culprit - Extension Method - in the plugin code that was causing System.TypeLoadException exception on Dynamics CRM 2013 Online only.

    public static bool IsEqualTo<TSource>(this IEnumerable<TSource> value, IEnumerable<TSource> compareList)
    {
        return IsEqualTo(value, compareList, null);
    }

Plugin fired successfully after removing this.

Extension method was working perfect on Dynamics CRM 2013 On-Premises and Dynamics CRM 2015 Online and On-premise (in sandbox modes).

As this was the large code base, thanks to the Dependency Graph feature in VS2013 that helped me in finding this by removing the classes one by one.