web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

CRM 2016 Online Error : Attempt by security transparent method

(0) ShareShare
ReportReport
Posted on by

Hello,

I'm using CRM 2016 Online and I want to use JavaScriptSerializer (System.Web.Extensions.dll) but it throws an error like this. Anyone encountered this error ? 

Attempt by security transparent method 'CRMKitchen.CRM.Plugins.CoursePostAsyncCreate.ExecuteCoursePostAsyncCreate(LocalPluginContext)' to access security critical method 'System.Web.Script.Serialization.JavaScriptSerializer..ctor()' failed.

Assembly 'CRMKitchen.CRM.Plugins, Version=1.0.0.3, Culture=neutral, PublicKeyToken=05038d1f23a89c0d' is partially trusted, which causes the CLR to make it entirely security transparent regardless of any transparency annotations in the assembly itself. In order to access security critical code, this assembly must be fully trusted.

Assembly 'System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf38521ad364e35' is a conditionally APTCA assembly which is not enabled in the current AppDomain. To enable this assembly to be used by partial trust or security transparent code, please add assembly name 'System.Web.Extensions, PublicKey=0024000004800000940000000602000000240000525341310004000001000100B5FC90E7027F67871E773A8FDE8938C81DD402BA65B9201D60593E96C492651E889CC13F1415EBB53FAC1131AE0BD333C5EE6021672D9718EA31A8AEBD0DA0072F25D87DBA6FC90FFD594DA35E44C398C454307E8E33B8426143DAEC9F596836F97C8F74750E5975C64E2189F45DEF46B2A2B1247ADC3652BF5C308055DA9' to the the PartialTrustVisibleAssemblies list when creating the AppDomain.

Note : ILMerge does not work for CRM 2016 Online at least for me.

assemblies.PNG

*This post is locked for comments

I have the same question (0)
  • David Jennaway Profile Picture
    14,065 on at

    The issue is around the code access security attributes for the System.Web.Extensions assembly. I don't think there's any way around this in Crm Online, in which case there's no way to use the System.Web.Extensions assembly in Crm Online

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans