简体   繁体   中英

How asp.net creates session ids?

How asp.net creates session ids? are there any algorithm or math calculation or something like that? (I'm trying to make a bot program for a website but I need create sessionid without getting it from server response)

I think it can't be done, to generate session id without server. Server should track those sessions and generate specific ids by its configuration. So probably it needs to be requested from the server.

You can't just make up a session identifier and hope it'll work on the server. Sure, the format of the made-up value might be absolutely correct, but it won't exist on the server, and your session will be just the same as if you didn't have it. You must push your bot through the same process that gets sessions started for "regular users". That doesn't necessarily have to authenticated (behind login), but to the minimum it's a retrieval of a webpage (this depends on the behavior of the server-app).

But if you're looking for the format, it's a random set of az and 0-9 characters, total of 24.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM