举报投诉联系我们 手机版 热门标签 名动网
您的位置:名动网 > websecurify WebSecurity GetUserId 方法

websecurify WebSecurity GetUserId 方法

2023-04-13 08:20 ASP.NET教程

websecurify WebSecurity GetUserId 方法

websecurify WebSecurity GetUserId 方法

websecurify

WebSecurity - GetUserId()


WebSecurity 对象 WebSecurity 对象

定义

GetUserId() 方法返回指定用户的 ID。


C# 和 VB 语法

WebSecurity.GetUserId(userName)


参数

参数 类型 描述
userName String 用户名


返回值

类型 描述
Integer

用户 ID



错误和异常

在下面的情况下,任何对 WebSecurity 对象的访问将抛出一个 InvalidOperationException

  • InitializeDatabaseConnection() 方法没有被调用
  • SimpleMembership 没有初始化(或者在网站配置中禁用)

备注

用户 ID 是存储在用户数据库中的用户信息的主键。

它是用于在用户资料表和会员表中识别用户。


技术数据

名称
Namespace WebMatrix.WebData
Assembly WebMatrix.WebData.dll


WebSecurity 对象 WebSecurity 对象
阅读全文
以上是名动网为你收集整理的websecurify WebSecurity GetUserId 方法全部内容。
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。
相关文章
© 2024 名动网 mdwl.vip 版权所有 联系我们