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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Non-sanbox plugin throws Request for the permission of type System.Security.Permissions.EnvironmentPermission failed error

(0) ShareShare
ReportReport
Posted on by 21

Hello,


We have a plugin which need to send some XML content to a web service. To frame this XML we need the machine name of where the plugin is executing (It could be any one of the application servers).

In CRM 2011, the same plugin used 'Environment.MachineName' to get the machine name and it worked successfully.


Now we have upgraded the instance to CRM 2016 and it is in a new server. Now the code errors out as below.

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

 

It is not a sandbox plugin (Isolation Mode is None. In DB, isolation mode is 1). The plugin is running under calling user context (The same error occurs even when running under service account). We have also changed the key for dll multiple times, but no luck.

 

Request your help!!

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: Non-sanbox plugin throws Request for the permission of type System.Security.Permissions.EnvironmentPermission failed error

    Is your system on-premise or cloud?

    Which plugin is causing this error?

  • Parthiban.T Profile Picture
    15 on at
    RE: Non-sanbox plugin throws Request for the permission of type System.Security.Permissions.EnvironmentPermission failed error

    Hi  ,

    Can you explain more on above point which you have mentioned .

    Right now i am facing same scenario ..

  • Community Member Profile Picture
    on at
    RE: Non-sanbox plugin throws Request for the permission of type System.Security.Permissions.EnvironmentPermission failed error

    Hi Raz,

    what do you mean with full permissions?

    On the frontentserver?

    In CRM?

  • Suggested answer
    razdynamics Profile Picture
    17,308 User Group Leader on at
    RE: Non-sanbox plugin throws Request for the permission of type System.Security.Permissions.EnvironmentPermission failed error

    Hi Michael This error usually occurs when we register a  plugin in sandbox mode. Can you please try to give NETWORK SERVICE\ dynamic crm App pool identity user full permission so that they can read environment variables?

    Best Wishes, Raz

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Aric Levin - MVP Profile Picture

Aric Levin - MVP 2 Moderator

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#3
MA-04060624-0 Profile Picture

MA-04060624-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans