locked
Error with Plugin RRS feed

  • Question

  • I have created and deployed a VB plugin to CRM2013. CRM2013 is sunning on SQL2012 Server. The plugin connects to a SQL2008R2 server to update a legacy system on CRM record Create

    When creating a record I get the following error which is not much use. Can anyone make any suggestions as to how to elaborate on this error and track down the problem

    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: An error occurred. Contact a system administrator or refer to the Microsoft Dynamics CRM SDK troubleshooting guide.Detail:
    <OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
      <ErrorCode>-2147220891</ErrorCode>
      <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
        <KeyValuePairOfstringanyType>
          <d2p1:key>OperationStatus</d2p1:key>
          <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">0</d2p1:value>
        </KeyValuePairOfstringanyType>
        <KeyValuePairOfstringanyType>
          <d2p1:key>SubErrorCode</d2p1:key>
          <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">-2146233088</d2p1:value>
        </KeyValuePairOfstringanyType>
      </ErrorDetails>
      <Message>An error occurred. Contact a system administrator or refer to the Microsoft Dynamics CRM SDK troubleshooting guide.</Message>
      <Timestamp>2014-10-22T16:20:37.5073708Z</Timestamp>
      <InnerFault i:nil="true" />
      <TraceText>

    [ActivityFeeds.Plugins: ActivityFeeds.Plugins.ActivityClose]
    [df5b6a5f-f859-e411-80df-00155d01d308: ActivityFeeds.Plugins.ActivityClose: Create of  any Entity]


    </TraceText>
    </OrganizationServiceFault>


    Dont ask me .. i dont know

    Wednesday, October 22, 2014 4:30 PM

Answers

  • the System.Data.SqlClient.SqlClientPermission, System.Data requires a full trust. This means that if you are onpremise you need to register your plugin outside the sandbox, if you are using CRM Online you can't use that dll, because sandbox only allows partial trust.

    My blog: www.crmanswers.net - Rockstar 365 Profile

    • Proposed as answer by Guido PreiteMVP Wednesday, October 22, 2014 4:50 PM
    • Marked as answer by Pete Newman Wednesday, October 22, 2014 10:16 PM
    Wednesday, October 22, 2014 4:49 PM

All replies

  • probably you registered your step under the ActivityFeeds plugin and not under your plugin.

    it's a common mistake, because after you register the plugin, it's not your plugin to be selected after but the first in the list, often the ActivityFeeds one.


    My blog: www.crmanswers.net - Rockstar 365 Profile

    • Proposed as answer by Guido PreiteMVP Wednesday, October 22, 2014 4:50 PM
    Wednesday, October 22, 2014 4:35 PM
  • Spot on !.  However I have now come up with a different error

    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Error Connecting to SQL Server - Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.Detail:
    <OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
      <ErrorCode>-2147220891</ErrorCode>
      <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
        <KeyValuePairOfstringanyType>
          <d2p1:key>OperationStatus</d2p1:key>
          <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">0</d2p1:value>
        </KeyValuePairOfstringanyType>
        <KeyValuePairOfstringanyType>
          <d2p1:key>SubErrorCode</d2p1:key>
          <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">-2146233088</d2p1:value>
        </KeyValuePairOfstringanyType>
      </ErrorDetails>
      <Message>Error Connecting to SQL Server - Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.</Message>
      <Timestamp>2014-10-22T16:36:47.2690134Z</Timestamp>
      <InnerFault i:nil="true" />
      <TraceText>

    [vbOriginatingAccounts: vbOriginatingAccounts.OAccountsAdd.ClsOAccountAdd]
    [a10906b3-035a-e411-80df-00155d01d308: vbOriginatingAccounts.OAccountsAdd.ClsOAccountAdd: Create of new_cboriginatingaccounts]


    </TraceText>
    </OrganizationServiceFault>


    Dont ask me .. i dont know

    Wednesday, October 22, 2014 4:41 PM
  • the System.Data.SqlClient.SqlClientPermission, System.Data requires a full trust. This means that if you are onpremise you need to register your plugin outside the sandbox, if you are using CRM Online you can't use that dll, because sandbox only allows partial trust.

    My blog: www.crmanswers.net - Rockstar 365 Profile

    • Proposed as answer by Guido PreiteMVP Wednesday, October 22, 2014 4:50 PM
    • Marked as answer by Pete Newman Wednesday, October 22, 2014 10:16 PM
    Wednesday, October 22, 2014 4:49 PM