通过


ProfileBase.UserName 属性

定义

获取配置文件的用户名。

public:
 property System::String ^ UserName { System::String ^ get(); };
public string UserName { get; }
member this.UserName : string
Public ReadOnly Property UserName As String

属性值

分配给配置文件的配置文件或匿名用户标识符的用户名。

注解

UserName 属性返回与配置文件关联的经过身份验证的用户的名称;如果该 IsAnonymous 属性是 true,则返回分配给配置文件的匿名用户标识符。

使用 anonymousIdentification 配置节和用于指定配置文件属性 的 add 配置元素的 allowAnonymous 属性启用对用户配置文件的匿名访问。

适用于

另请参阅