다음을 통해 공유


Available and Unavailable .NET Assemblies from Sandboxed Solutions in SharePoint 2010

Applies to: SharePoint Foundation 2010

Available in SharePoint Online

This topic lists the Microsoft .NET Framework 3.5 assemblies that are available from SharePoint sandboxed solutions and those that are unavailable.

Warning

The Sandbox Solution framework provides a mechanism for executing user-provided code outside of the IIS worker process. The Sandbox Solution framework should not be used as a mechanism for enforcing security boundaries when executing user code. Sandbox Solutions are not supported as a security boundary with user code, especially code of unknown origin. We advise against executing Sandbox Solutions of unknown origins.

Limitations on .NET Framework Availability from Sandboxed Solutions

Sandboxed solutions run in a special sandboxed worker process (SPUCWorkerProcess.exe) that is governed by a highly restrictive code access security (CAS) policy. In addition to the specifics of this policy, the very fact that there is such a policy, and that it does not grant full permissions, makes the code that runs in the sandbox a partially trusted caller. This means that such code can access only those .NET Framework 3.5 assemblies that have the AllowPartiallyTrustedCallersAttribute attribute. The following sections list the .NET Framework 3.5 assemblies that do and do not have this attribute.

Security noteSecurity Note

Remember that having the attribute is a necessary, but not a sufficient, condition for calling the assembly's classes from sandboxed code. Such an assembly may have classes or members that require a permission that is not allowed by the CAS policy of the sandboxed worker process.

.NET Framework 3.5 Assemblies That Have the AllowPartiallyTrustedCallers Attribute

Assembly

Remarks

Accessibility

IEExecRemote

Microsoft.VisualBasic

Microsoft.Vsa

mscorlib

PresentationCore

PresentationFramework and all PresentationFramework.*

Windows Presentation Foundation

Sentinel.v3.5Client

System

All System.* except the 19 System.* assemblies listed in the next table. Most of the exceptions have "Design," "Runtime," or "Workflow" in the assembly name.

System.Windows.Forms

Windows Forms

UIAutomationProvider

UIAutomationTypes

WindowsBase

.NET Framework 3.5 Assemblies That Do Not Have the AllowPartiallyTrustedCallers Attribute

csccompmgd

CustomMarshallers

IEHost

IIEHost

ISymWrapper

All Microsoft.Build.*

Microsoft.Data.Entity.Build.Tasks

Microsoft.VisualBasic.Compatibility

Microsoft.VisualBasic.Compatibility.Data

Microsoft.VisualBasic.Vsa

Microsoft.VisualC

Microsoft.VisualC.STLCLR

Microsoft.Vsa.Vb.CodeDOMProcessor

Microsoft_VsaVB

PresentationBuildTasks

ReachFramework

Printing and XPS

sysglobl

System.Configuration.Install

System.Data.Services.Design

System.Design

System.Drawing.Design

System.IdentityModel.Selectors

System.IO.Log

System.Management

System.ManagementInstrumentation

System.Messaging

System.Runtime.Remoting

System.Runtime.Serialization.Formatters.Soap

System.Speech

System.Web.DynamicData.Design

System.Web.Entity.Design

System.Web.Extensions.Design

System.Workflow.Activities

System.Workflow.ComponentModel

System.Workflow.Runtime

System.WorkflowServices

UIAutomationClient

UIAutomationClientsideProviders

WindowsFormsIntegration

See Also

Concepts

Restrictions on Sandboxed Solutions in SharePoint 2010

Sandboxed Solutions Architecture in SharePoint 2010

Other Resources

Sandboxed Solutions Resource Center | SharePoint 2010

SharePoint Developer Team Blog

SharePoint Developer Center