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)

Exceptions only displayed for plugin trace logs

(0) ShareShare
ReportReport
Posted on by

            

Hi All,

I'm trying to collect some information from a plugin that executes successful. But for some reason the plugin trace log will only show if the plugin execution failed(errors). I have set "Enable logging to plug-in trace log" to "All" and I'm using 2016 on premise with the latest rollup.  Can someone help please?

Thank you

*This post is locked for comments

I have the same question (0)
  • Tim Dutcher Profile Picture
    2,100 on at

    Are you using the tracing service as described on the following page?  msdn.microsoft.com/.../gg328574.aspx

  • Inogic Profile Picture
    703 on at

    Hi BobbyC,

    Please make sure while registering plugin your plug-in isolation mode is selected as sandbox instead of none.

    You can refer this link to know more about plug in trace log services.

    http://www.inogic.com/blog/2015/04/plug-in-trace-log-in-crm-2015-update-1/ 

    Hope this helps!

    Thanks!
    Sam

  • Community Member Profile Picture
    on at

    Hi both, thanks for reply. I am using None to register the plugin because when I select Sandbox it will fail all the time with the below error

    Error Message:

    Unhandled Exception: Microsoft.Crm.CrmException: Unexpected exception from plug-in (Execute):

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

      at Microsoft.Crm.Sandbox.SandboxCodeUnit.Execute(IExecutionContext context)

      at Microsoft.Crm.Asynchronous.EventOperation.InvokePlugin(AsyncExecutionContext context, IPlugin pluginInstance)

  • Verified answer
    Tim Dutcher Profile Picture
    2,100 on at

    According to the CRM SDK: "Tracing is supported for sandboxed (partial trust) and full trust registered custom code and during synchronous or asynchronous execution. Tracing isn’t supported for custom code that executes in Microsoft Dynamics CRM for Outlook or other mobile client."

    I would write a small simple plug-in that simply traces out "Hello world" or something to see whether CRM successfully logs that plug-in's output. It could be that code in the plug-in you're working with is somehow causing the plug-in trace details to be lost.  I haven't run into that but it's just a guess.

  • Community Member Profile Picture
    on at

    Thank you Tim

  • Jonas Rapp Profile Picture
    536 on at

    It appears plugins out of sandbox does not write to the plugin trace log.

    That does not correspond to the quote from Tim above.

    If you find a solution to getting out of sandbox plugins to log, please let me know :)

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