Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我检查了我自己的服务器会话 ID,它们都是 24 个字符
我将每个登录的个人会话 ID 存储在我的 sql 服务器中
所以我的问题是
有一个专栏
char(24)存储访问者的 SessionId 是否足够?
char(24)
ASP.NET 4.0
Session kept as : State Server tcpip=127.0.0.1:42424
撇开您是否应该这样做不谈,SessionIDManager 对会话 ID 实施 80 个字符的限制。
http://msdn.microsoft.com/en-us/library/system.web.sessionstate.sessionidmanager.sessionidmaxlength(v=vs.100).aspx