共用方式為


SPWebApplication.GrantAccessToProcessIdentity Method

Include Protected Members
Include Inherited Members

Grants the specified process identity account access to the Web application based on the parameters that are provided.

Overload List

  Name Description
Public method GrantAccessToProcessIdentity(String) Grants the specified process identity account access to the Web application based on the username. Access to the process identity provides the permissions that are specified in the policy role parameter.
Public method GrantAccessToProcessIdentity(String, SPPolicyRoleType) Grants the specified process identity account access to the Web application based on the name of the user and the level of access. Access to the process identity provides full control of the SharePoint Web application.

Top

Remarks

This method is useful when the specified account is used to access the object model outside of the impersonated context of a Web request.

See Also

Reference

SPWebApplication Class

SPWebApplication Members

Microsoft.SharePoint.Administration Namespace