asp.net-membership - WebSecurity 和长 ID

标签 asp.net-membership security webmatrix

我希望对系统中的各种 id 值使用长数据类型 (bigint),并且 WebSecurity 类的当前实现假设 UserId 是 int (smallint)。

我正在考虑下载源代码并对其进行编辑以改用长数据类型。有谁知道这是否已经完成?

TIA,

最佳答案

如果您愿意,您可以将表中的 UserId 列定义为 bigint。您只需告诉 WebSecurity 帮助程序在 InitializeDatabaseConnection 中使用哪一列。方法。

请参阅这篇文章,了解如何初始化 WebSecurity 帮助程序以使用现有数据库架构,而不是允许它创建自己的数据库架构:THE most basic way to implement ASP.NET Razor security

关于asp.net-membership - WebSecurity 和长 ID,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12895070/

相关文章:

asp.net - 没有成员身份的 FormsAuthentication 角色

security - MVC5 AntiForgeryToken 声明/"Sequence contains more than one element"

security - 安全环境中的 CF 和 PDF

c# - 为什么我的 SQL 查询在转换后比较日期时选择所有行?

asp.net - 全局主题目录的 iis 快速路径

wcf - 如何验证、过滤和验证基于 WCF 的 oData 结果?

sql-server-2005 - 所有用户的成员身份 SHA1 哈希值不相同

.net - 加密应用服务连接字符串

php - 出于安全原因,如何覆盖 php 内存?

asp.net - 我可以在 WebMatrix Beta 2 中设置 Windows 身份验证吗?