共用方式為


SPUserCodeService.AlwaysRecycleAppDomains Property

Gets or sets a value that indicates whether the service should keep the application domain of a specific sandboxed solution alive after the solution has finished and reuse the same domain the next time there is are request for the same solution.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Property AlwaysRecycleAppDomains As Boolean
    Get
    Set
'Usage
Dim instance As SPUserCodeService
Dim value As Boolean

value = instance.AlwaysRecycleAppDomains

instance.AlwaysRecycleAppDomains = value
public bool AlwaysRecycleAppDomains { get; set; }

Property Value

Type: System.Boolean
true if the service should not reuse the application domain; otherwise, false.

Remarks

For performance reasons, this value is normally false, so application domains are reused. Be aware that static values are loaded in the application domain only when the application domain is first created. Hence, the same values are used for each instance of the sandboxed solution until the application domain is recycled.

See Also

Reference

SPUserCodeService Class

SPUserCodeService Members

Microsoft.SharePoint.Administration Namespace