Click here to Skip to main content
15,891,976 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,
Does Session.SessionID can be duplicate?
Please guide.
Eg: If an user from Asia and Africa can have same session.id.
Posted

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!!
 
Share this answer
 
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:
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.

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

Hope, it helps :)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900