Share via


SPSecurity.CodeToRunElevated Delegate

Represents a delegate method that can be executed by the RunWithElevatedPrivileges method.

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

Syntax

'Declaration
Public Delegate Sub CodeToRunElevated
'Usage
Dim instance As New CodeToRunElevated(AddressOf HandlerMethod)
public delegate void CodeToRunElevated()

Remarks

The delegate method runs under the account that is used by the application pool identity. This gives the delegate site collection administrator privileges on all site collections hosted by the application pool.

See Also

Reference

Microsoft.SharePoint Namespace

RunWithElevatedPrivileges(SPSecurity.CodeToRunElevated)

Other Resources

Elevation of Privilege