返回当前用户的 Windows 标识。
命名空间: Microsoft.SharePoint
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Public Shared Function GetWindowsIdentity As WindowsIdentity
用法
Dim returnValue As WindowsIdentity
returnValue = SPSecurityContext.GetWindowsIdentity()
public static WindowsIdentity GetWindowsIdentity()
返回值
类型:System.Security.Principal.WindowsIdentity
一个代表 Windows 用户的对象。
备注
您可以访问IsWindowsIdentityAvailable属性来确定标识调用GetWindowsIdentity方法之前是否可用于当前用户。