session - How does ASP.NET ensure unique SessionID? -
i've seen lot of questions (both on stackoverflow , elsewhere) asking whether asp.net sessionids unique. documentation suggests answer yes, , said documentation quoted in answers (to tune of either "asp.net generates unique ids active sessions" or "you've set regenerateexpiredsessionid=true"). guess that's fair enough.
however, poking through reflector code sessionidmanager , sessionstatemodule, can't find seems should guarantee uniqueness part. sessionid.create generates random byte[15], , nothing calls seems perform checks.
so if seems answer documentation, documentation backed code? or uniqueness mean "cryptographic uniqueness" or something, probability of collision small enough choose not worry it? admit performance standpoint feasible way can think of "ensure" uniqueness, if that's case why caveat never mentioned?
Comments
Post a Comment