locked
CRM 2011: Debugging Sandbox Plugins RRS feed

  • Question

  • I am working on some sandboxed plugins for CRM 2011 and trying to debug them. I have follwed the instructions in the SDK and set the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM\SandboxDebugPlugins = 1 on my dev server.

    This doesn't seem to make any difference as I still get problems with the sandbox terminating my plugins while I'm debugging them. Has anyone managed to get this working and debug sandbox plugins?

    The error I get when the plugin is terminated is:

    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: The plug-in execution failed because the operation has timed-out at the Sandbox Client.
    System.TimeoutException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #DA4E058FDetail:
    <OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
      <ErrorCode>-2147204751</ErrorCode>
      <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
      <Message>The plug-in execution failed because the operation has timed-out at the Sandbox Client.
    System.TimeoutException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #DA4E058F</Message>
      <Timestamp>2011-08-18T14:09:35.1247924Z</Timestamp>
      <InnerFault i:nil="true" />
      <TraceText>...</TraceText>
    </OrganizationServiceFault>

    Thursday, August 18, 2011 2:21 PM

Answers

  • Plugins have a 2 minute timeout so it seems that your plugin is taking too long to execute in sandbox.

    In order to debug sandbox plugin you have to attach to the sandbox worker processes (instead of w3wp) in the debugger. You could always debug outside of sandbox and then move it to sandbox when the debuggin is done.


    Gonzalo | gonzaloruizcrm.blogspot.com

    Thursday, August 18, 2011 2:23 PM
    Moderator

All replies

  • Plugins have a 2 minute timeout so it seems that your plugin is taking too long to execute in sandbox.

    In order to debug sandbox plugin you have to attach to the sandbox worker processes (instead of w3wp) in the debugger. You could always debug outside of sandbox and then move it to sandbox when the debuggin is done.


    Gonzalo | gonzaloruizcrm.blogspot.com

    Thursday, August 18, 2011 2:23 PM
    Moderator
  • Yeah I've successfully attached but I just have to fit my debugging into 2 minute sessions - which can be tricky!

    I think I will have to debug outside and then retest with the assembly back in the sandbox. Thanks for the response.


    Does make me wonder what, if anything, the registry key does.
    Thursday, August 18, 2011 2:27 PM