Is it possible to generate a new ID for the session using ASP.NET?
I want it to change when someone logs in to my website just before I set their initial session variables.
You can do this using the SessionIdManager class:
SessionIDManager manager = new SessionIDManager();
string newID = manager.CreateSessionID(Context);
bool redirected = false;
bool isAdded = false;
manager.SaveSessionID(Context, newID, out redirected, out isAdded);
[Code sample is from Anas Ghanem's article]