Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Getting System.Security.Permission.SecurityPermission error while trying to access registry keys through plugin.

(1) ShareShare
ReportReport
Posted on by 1,157

Dear Experts,

I have a plugin which is triggered on Delete message(Pre-validation) of campaign entity and it used to update some fields in 'account' entity using SQL stored procedure. Month back it was absolutely working fine but now it is giving me a SecurityPermission error when it is trying to access the registries from ocalMachine/Software/Microsoft/MSCRM.

Please note that:

1. We did not made any changes in our code.

2. Using SQL SP is unsupported but due to the requirement we need to use SQL stored procedure only.

 

Error Details:

Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

EA2459ErrorDetails.jpg

Environment and Plugin Details:

MSCRM - 2013 SP1 On-Prem(6.1.1.132)

Plugin isolation mode - None

Step Message - Delete(Pre-validation)

Step Execution Mode - Sync

OS Details:

Windows Server 2012 R2 - 64 bit (Latest updates are installed)


Already tried:

- Enabled tracing through registry keys and collected the issue traces but didnt helped us to resolve the issue.

- Give full control to LocalMachine/Software/Microsoft/MSCRM and mscorlib file located at 'E:\Program Files\Microsoft Dynamics CRM\CRMWeb\_static\_common\scripts'

Is there any permission need to provide to resolve this error? If yes, then please help with those permissions.

Thanks in advance. 

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Getting System.Security.Permission.SecurityPermission error while trying to access registry keys through plugin.

    Hi Jayesh,

    I have the same problem. My plugin worked for a while but this week stopped working.

    How did you solved it?

  • Suggested answer
    Emre GULCAN Profile Picture
    Emre GULCAN 2,379 on at
    RE: Getting System.Security.Permission.SecurityPermission error while trying to access registry keys through plugin.

    Hi Jayesh,

    Please check this links

    https://community.dynamics.com/crm/f/117/t/219715 

    https://community.dynamics.com/crm/f/117/t/145118 

    https://community.dynamics.com/crm/f/117/t/202942

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,375 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans