locked
Sandbox security in plugin when accessing database in CRM 2011 RRS feed

  • Question

  • Hi,

    I have a plugin, when I registered the assembly in None of Isolation Mode, it works fine.  However, when I registered in Sandbox mode, it failed.  The plugin accesses internal CRM database, as well as external SQL database.  The error is related to sqlClientPermission.  Does anybody have the similar issue?  Thanks.  BTW, I registered step in Asynchronous execution mode, and Pipeline Stage is post-operation.

    Wednesday, August 20, 2014 11:55 PM

Answers

  • Yep. When using sandbox mode you need to access data via web services only. No direct SQL access.
    • Proposed as answer by Caratacus Thursday, August 21, 2014 11:17 AM
    • Marked as answer by chicago bq Wednesday, August 27, 2014 12:45 PM
    Thursday, August 21, 2014 11:16 AM

All replies

  • Certain .NET assemblies require full trust which isn't allowed when registered in Sandbox mode.

    Plug-in isolation, trusts, and statistics

    In Online environments - access to thing like the event log, file system, etc... wouldn't be allowed because you're in a shared environment.


    Jason Lattimer
    My Blog -  Follow me on Twitter -  LinkedIn

    Thursday, August 21, 2014 3:14 AM
    Moderator
  • Yep. When using sandbox mode you need to access data via web services only. No direct SQL access.
    • Proposed as answer by Caratacus Thursday, August 21, 2014 11:17 AM
    • Marked as answer by chicago bq Wednesday, August 27, 2014 12:45 PM
    Thursday, August 21, 2014 11:16 AM
  • Hi, Caratacus-

    Thanks.  Web service solved CRM 2011 plugin CAS dilemma.

    Wednesday, August 27, 2014 12:45 PM