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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Assembly does not allow partially trusted callers

(0) ShareShare
ReportReport
Posted on by

Hi 

if someone can shed some light on this error

Unexpected exception from plug-in (Execute): CreateAppointment.CreateAppointment: System.Security.SecurityException: That assembly does not allow partially trusted callers.

I am trying to write a plugin which is using another dll 

Please let me know if this information is not sufficient 

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    I did mention

    [assembly: AllowPartiallyTrustedCallers]

    in code still no luck :(

  • Mathieu L Profile Picture
    100 on at

    Hi,

    I do not think that we can use a dll in a plugin.

    you should merge your two dll with ilmerge and redeploy

  • Verified answer
    Mahadeo Matre Profile Picture
    17,021 on at
  • Suggested answer
    Guido Preite Profile Picture
    54,086 Moderator on at

    try to register your plugin outside the sandbox (option "None" inside the plugin registration tool window)

  • Suggested answer
    Surmeet Singh Profile Picture
    3,075 on at

    Hi Vamshee,

    You need to do 2 things:

    1. Register the another dll in GAC of the CRM server

    2. Register the plugin in "None" mode rathers than Sandbox.

  • Community Member Profile Picture
    on at

    I tried to register plugin as none Isolation mode and i got the below error

    <Message>Action failed for assembly 'CreateAppointment, Version=1.0.0.1, Culture=neutral, PublicKeyToken=4ea5f5b22d5e7971': Assembly must be registered in isolation.</Message>

  • Community Member Profile Picture
    on at

    Hi Surmeet

    1.I registered the dll in Gac bot not using GACUTIL but using Powershell

    2. When i tried to register the plugin in None Mode i got below error

    <Message>Action failed for assembly 'CreateAppointment, Version=1.0.0.1, Culture=neutral, PublicKeyToken=4ea5f5b22d5e7971': Assembly must be registered in isolation.</Message>

  • Suggested answer
    Mahadeo Matre Profile Picture
    17,021 on at

    Hi..

    Are you in Deployment Administrators group of Deployment Manager?

    If you are not deployment administrator, then also you will get this error.

    please Check for more details

    blogs.msdn.com/.../error-message-assembly-must-be-registered-in-isolation-when-registering-plugins-in-microsoft-dynamics-crm-2011.aspx

    if you are deployment admin, and still getting error, then please check

    mahenderpal.wordpress.com/.../assembly-must-be-registered-in-isolation-error-ms-crm-2011

    Hope this will help..

  • Suggested answer
    Vamshee Profile Picture
    140 on at

    Amazing that worked!!!!

    i added myself as deployment administrator, registered my plugin as None in isolation mode and that made the trick

    Thanks a lot Mahadeo :)

  • Mahadeo Matre Profile Picture
    17,021 on at

    Vamashee..

    you are welcome..

    Can you please mark answers as Verified.. which ever answers are helped..

    So that it will helpful for other community users to resolve their similar issues.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans