Click here to Skip to main content
15,892,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
I have regenerated my session on login page and set session["xx"}="yy"; in some of the variables.
but after redirecting to home page session data is lost.
Can anyone tell me about this problem. Here is the code for session regeneration.
C#
SessionIDManager manager = new SessionIDManager();
manager.RemoveSessionID(System.Web.HttpContext.Current);
var newId = manager.CreateSessionID(System.Web.HttpContext.Current);
var isRedirected = true;
var isAdded = true;
manager.SaveSessionID(System.Web.HttpContext.Current, newId, out isRedirected, out isAdded);
Posted
Updated 19-Mar-13 20:16pm
v2
Comments
Prasad Khandekar 20-Mar-13 2:27am    
I understand that you are probably trying to provide a fix for Session Fixation Attack. There is a solution suggested by microsfot (http://support.microsoft.com/kb/899918). Please go through it. One more suggestion is always host your application with SSL.

1 solution

Hello Rahul,

Go through this[^] article available on this site itself. It should help you in fixing your problem.

Regards,
 
Share this answer
 

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