In my sandboxed solution I have the following code that activates a proxy:

public override void FeatureActivated(SPFeatureReceiverProperties properties)
            var type = typeof (ManagedLicenses.LicenseValidatorProxy);
            var proxyOperationType = new SPProxyOperationType(type.Assembly.FullName, type.FullName);
            var userCodeService = SPUserCodeService.Local;

Everything works fine on SharePoint 2010 - however I can't get it to work on SharePoint 2013 as I get the following exception thrown:

Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain: An unexpected error has occurred. - userCodeWrapperType = "Microsoft.SharePoint.UserCode.SPUserCodeWebPartWrapper", userAssemblyGroupId = "1E58ADFF1BC14371BE7F7489551FBC5C-jfb9KwaIeEukOpyOxra2T8r/NE+fdQzldzg4bIF7Pfc=", siteCollectionId = "c4c2d6ab-8e79-491e-9d16-051a98696a4d" - Inner Exception: Microsoft.SharePoint.UserCode.SPUserCodeSolutionProxiedException: This code is calling a privileged proxy operation that is not available on this farm. Please contact your farm administrator.

I wonder if anybody else here had similar problems or knows a solution.

  • Is this even supported in SharePoint 2013? "Sandbox Solutions changed their relationship status to 'it's complicated'". (That's the most accurate way I can describe the obsolete/deprecated status of SandBox solutions in 2013, nobody knows the truth yet).
    – James Love
    Commented Jun 23, 2013 at 20:46
  • I would love to get an answer to that question. Commented Jun 24, 2013 at 6:20

1 Answer 1


You cannot activate a Proxy in a Sandboxed solution, that would violate the security mechanism.

  • Hi Wictor, thanks for reading my question. I am not sure you understood it correctly though - my example is straight from msdn and I am confident the proxy serves exactly the purpose I am trying to use it for. Commented Jul 16, 2013 at 9:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.