Freigeben über


Sandboxed Solutions in Partnership with Full-Trust Proxies in SharePoint 2010

This topic explains proxies that can be called by a Lösung mit eingeschränkter Sicherheitsstufe to execute an action that is ordinarily not available to Lösungen mit eingeschränkter Sicherheitsstufe.

Letzte Änderung: Montag, 18. April 2011

Gilt für: SharePoint Foundation 2010

Microsoft SharePoint Foundation provides several ways that Lösungen mit eingeschränkter Sicherheitsstufe can escape the usual restrictions on what they can do and what they can access. One of these techniques is to create a special kind of operation that runs in a full trust process, but that can be called from a Lösung mit eingeschränkter Sicherheitsstufe. The operation is deployed as a Farmlösung by a farm administrator who trusts it and is prepared to let Lösungen mit eingeschränkter Sicherheitsstufe call it. These operations are called full-trust proxy operations.

HinweisHinweis

Because the assembly with the full-trust proxy operation must be deployed by a farm administrator as a Farmlösung, 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. In such scenarios, you can use other techniques to escape the sandbox restrictions, such as using client object model code to access resources that are not otherwise available to Lösungen mit eingeschränkter Sicherheitsstufe.

Full-Trust Proxy Operation and Sandboxed Solution Development and Deployment Scenarios

The proxy operation technique requires that a Farmlösung be developed that includes one or more classes that derive from SPProxyOperation. Each of these defines an operation that runs in full trust, and that you can call from Lösungen mit eingeschränkter Sicherheitsstufe by using the ExecuteRegisteredProxyOperation method. For detailed information about creating and deploying a full-trust proxy operation and calling it from a Lösung mit eingeschränkter Sicherheitsstufe, see How to: Create a Full-Trust Proxy Operation.

Although the assembly with the full-trust proxy operation runs in full trust, it does not run in the main w3wp.exe process that is handling the HTTP request. Instead, it runs in the SPUCWorkerProcessProxy.exe process that is described in Umgehen der für Sandkastenlösungen geltenden Einschränkungen. The proxy operations can return data to the Lösung mit eingeschränkter Sicherheitsstufe.

Figure 1 shows how a request that accesses a Lösung mit eingeschränkter Sicherheitsstufe is processed when the Lösung mit eingeschränkter Sicherheitsstufe makes a call to a full-trust proxy operation.

Figure 1. Request processing model when a sandboxed solution calls a full-trust proxy operation

Sandkasten- und voll vertrauenswürdiges Proxyprozessmodell

Although you can develop a full-trust proxy operation and a Lösung mit eingeschränkter Sicherheitsstufe as a pair of projects designed to work with one another, this would not be the typical scenario. If the farm administrator trusts your code enough to deploy the proxy as a Farmlösung, you might equally well make the whole project a Farmlösung. More frequently, a full-trust proxy operation is developed to provide a service to multiple Lösungen mit eingeschränkter Sicherheitsstufe.

Siehe auch

Aufgaben

How to: Create a Full-Trust Proxy Operation

Walkthrough: Creating and Calling a Full-Trust Proxy Operation

Weitere Ressourcen

Sandboxed Solutions Resource Center | SharePoint 2010

SharePoint Developer Team Blog

SharePoint Developer Center