Question

I am attempting to prove out that you can use a full trust proxy with SharePoint online. If you take a look at SPProxyOperation on MSDN, you'll see the little note that says Available In SharePoint Online under the assembly name. Great, fantastic!

But now how am I supposed to register my proxy with the user code service? All examples that I can find (that refer to a local environment), deploy a Farm solution and run the following code:

public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
    SPUserCodeService userCodeService = SPUserCodeService.Local;
    if (userCodeService != null)
    {
        string assemblyName = this.GetType().Assembly.FullName;
        SPProxyOperationType SendEmailOperation = new SPProxyOperationType(assemblyName, typeof(SendEmailProxy).FullName);
        userCodeService.ProxyOperationTypes.Add(SendEmailOperation);
        userCodeService.Update();
    }
    else { throw new ApplicationException("User Code Service not running."); }
}

Well the issue is pretty straight forward. Having a look at SPUserCodeService's documentation, it does NOT state Available In SharePoint Online. If that is the case, how am I supposed to register my proxy, which is clearly (er, according to MSDN) supported.

Was it helpful?

Solution

The answer is simple. There is no way for you to register custom operations, but if Microsoft created and published these operations you could use them from within the sandbox.

OTHER TIPS

Of course Wictor is correct. Here is the exact place in MSDN where the thing is stated:

Because the assembly with the full-trust proxy operation must be deployed by a farm administrator as a farm solution, this technique cannot be used when farm deployment is not an option, such as when your solution is to be deployed to Microsoft SharePoint Online. [...]

So I guess you have to go with SP Client Object Model and/or Silverlight.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top