Session.SessionID可以重复 [英] Can a Session.SessionID can be duplicate

查看:733
本文介绍了Session.SessionID可以重复的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友们,

Session.SessionID可以重复吗?

请指导。

例如:如果来自亚洲和非洲的用户可以有相同的session.id。

Dear Friends,
Does Session.SessionID can be duplicate?
Please guide.
Eg: If an user from Asia and Africa can have same session.id.

推荐答案

嗨Arunprasath,



是的,Session.SessionId可以是重复。 CP中有一个与此主题相关的问题。这是链接。



ASP.NET会话复制 [ ^ ]



一些有用的链接:



http://weblogs.asp.net/bsimser/228713 [ ^ ]

http://forums.asp.net/t/1488101.aspx?CAN+SESSION+ID+S+GET+DUPLICATED+OVER+TIME+ [< a href =http://forums.asp.net/t/1488101.aspx?CAN+SESSION+ID+S+GET+DUPLICATED+OVER+TIME+target =_ blanktitle =New Window> ^ ]



快乐学习!!
Hi Arunprasath,

Yes, Session.SessionId can be duplicate. There is a question in CP relating to this topic. Here is the link for that.

ASP.NET Session Duplicating[^]

Some helpful links:

http://weblogs.asp.net/bsimser/228713[^]
http://forums.asp.net/t/1488101.aspx?CAN+SESSION+ID+S+GET+DUPLICATED+OVER+TIME+[^]

Happy learning!!


他们可以拥有。

但不是同一个应用程序的同一时间。

会话ID由创建会话时的服务器生成。它保证它生成一个唯一的活动会话ID。但是,一旦会话死亡/超出范围,它就不能保证。

如果重新启动Web服务器,也可以获得相同的值

They can have.
But not at the same time for the same application.
Session id is generated by the server at the time of creation of session. It guarantees that it generates a unique alive session id. However, it doesn't guarantee once the session is dead/out of scope.
It is also possible to get same value if the web server is restarted
Quote:

您不应使用SessionID属性为数据库应用程序生成主键值。这是因为如果重新启动Web服务器,则某些SessionID值可能与服务器停止之前生成的值相同。

You should not use the SessionID property to generate primary key values for a database application. This is because if the Web server is restarted, some SessionID values may be the same as those generated before the server was stopped.



参考: https://msdn.microsoft.com/en-us/library/ms524326%28v=vs.90%29。 aspx [ ^ ]



希望,它有帮助:)


Reference: https://msdn.microsoft.com/en-us/library/ms524326%28v=vs.90%29.aspx[^]

Hope, it helps :)


这篇关于Session.SessionID可以重复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆