Quantcast
Channel: Jason Lattimer's Groups Activities
Viewing all articles
Browse latest Browse all 869

Dynamics CRM 365 (Online) plugin exception EnvironmentPermission using Azure Application Insights

$
0
0

Hi,

I am trying to track custom events using a plugin and Azure Application Insights. When I build the plugin, I use MSBuild.ILMerge.Task to merge the Application.Insights.dll with my plugin assembly. Here are the steps I 

followed to do the merge:  http://dynamicscrmcoe.com/il-merge-dynamics-crm-plugins/

The problem I have is that when I try to instantiate the Telemetry client:

var telemetryClient = new TelemetryClient();

I get this error:

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

I have tried granting permissions by using security attributes:

[EnvironmentPermission(SecurityAction.Assert, Unrestricted = true)]


and have also tried

[PermissionSet(SecurityAction.Assert, Name = "FullTrust")]

But nothing seems to work. Any ideas/advice would be appreciated.

Thanks in advance.




Viewing all articles
Browse latest Browse all 869

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>