Hi,
We got the below error in one of our Sandboxed Plugins
“System.Security.SecurityException: That assembly does not allow partially trusted callers”.
We realised it was because of using System.Web.HttpUtility class

We replaced it with EscapeDataString method and this fixed the issue.
System.Uri.EscapeDataString()
Helpful thread
https://stackoverflow.com/questions/3840762/how-do-you-urlencode-without-using-system-web
Hope it helps..
Discover more from Nishant Rana's Weblog
Subscribe to get the latest posts sent to your email.

One thought on “System.Security.SecurityException: That assembly does not allow partially trusted callers while using HttpUtility.UrlEncode in CRM”