Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Plugin to Parse SPO JSON by System.Web.Helpers Error

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I developed a Dynamics 365 Plugin to call SPO APIs.  System.Web.Helpers.dll is used to parse JSON data returns from SPO APIs. ILMerge is used to merge the hlpers dll with my plugin. When running the plugin. it threw an error in initializing the helpers dll.

Any ideas how to fix it?

Thanks

Runner288

The type initializer for 'System.Web.Helpers.Json' threw an exception

Unhandled exception: 
Exception type: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]
Message: An unexpected error occurred from ISV code. (ErrorType = ClientError) Unexpected exception from plug-in (Execute): SpoCrud.ShareDocByCaseTypeAndRecipient: System.TypeInitializationException: The type initializer for 'System.Web.Helpers.Json' threw an exception.Detail: 
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ActivityId>0a14c5ab-6440-4be8-86b2-1f0520f88d36</ActivityId>
<ErrorCode>-2147220956</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>An unexpected error occurred from ISV code. (ErrorType = ClientError) Unexpected exception from plug-in (Execute): SpoCrud.ShareDocByCaseTypeAndRecipient: System.TypeInitializationException: The type initializer for 'System.Web.Helpers.Json' threw an exception.</Message>
<Timestamp>2019-02-15T20:33:27.0738763Z</Timestamp> 

*This post is locked for comments

  • Suggested answer
    Radu Chiribelea Profile Picture
    Radu Chiribelea 6,667 on at
    RE: Plugin to Parse SPO JSON by System.Web.Helpers Error

    Hello,

    Unfortunately ILMerge is not supported with CRM. Please see following article for more details and a possible workaround: develop1.net/.../ILMergeNotSupported

    Hope this helps

    Radu

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans