locked
CRM 2013 Unexpected exception from plug-in (Execute): System.Security.SecurityException: That assembly does not allow partially trusted callers. RRS feed

  • Question

  • Hi Techies,

    I have a plugin which will send sms from CRM 2013 via plugin where i am using some provider to send sms.

    SMS is being sent successfully if it is on Premise.

    The same plugin i am trying to use it for online. But it is throwing the below error

    CRM 2013 Unexpected exception from plug-in (Execute):  System.Security.SecurityException: That assembly does not allow partially trusted callers.

    Then added 

    [assembly: AllowPartiallyTrustedCallers] , But still see the same issue. I am adding System.web as a refrence, I doubt it is being the issue, But i need that refrence to encode my string message

    HttpContext.Current.Server.HtmlEncode(strMessage);

    Does any faced this issue .

    your help is appreciated !!!

    Thank you,


    Sreeni Pavalla

    Thursday, September 25, 2014 2:27 PM

All replies

  • online will allways run under sandbox mode. sandbox will not allow you to do many things like access external resources,  add reference to suspicious dllls.


    I Hope I could help. If I have answered please mark as 'Answer'. If was just helpful, please vote. Thanks and happy coding! Bruno Lucas, http://dynamicday.wordpress.com/

    Friday, September 26, 2014 3:48 AM